1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-26 22:46:53 -04:00

Fixed adding multiple movies.

This commit is contained in:
Leonardo Galli
2017-01-03 12:52:09 +01:00
parent 4f6380a73c
commit 329786365d
4 changed files with 39 additions and 5 deletions
+16
View File
@@ -19,6 +19,22 @@ Handlebars.registerHelper('poster', function() {
return new Handlebars.SafeString('<img class="series-poster placeholder-image" src="{0}">'.format(placeholder));
});
Handlebars.registerHelper('remotePoster', function() {
var placeholder = StatusModel.get('urlBase') + '/Content/Images/poster-dark.png';
var poster = this.remotePoster;
if (poster) {
if (!poster.match(/^https?:\/\//)) {
return new Handlebars.SafeString('<img class="series-poster x-series-poster" {0}>'.format(Handlebars.helpers.defaultImg.call(null, poster, 250)));
} else {
var url = poster.replace(/^https?\:/, 'https://'); //IMDb posters need https to work, k?
return new Handlebars.SafeString('<img class="series-poster x-series-poster" {0}>'.format(Handlebars.helpers.defaultImg.call(null, url)));
}
}
return new Handlebars.SafeString('<img class="series-poster placeholder-image" src="{0}">'.format(placeholder));
})
Handlebars.registerHelper('traktUrl', function() {
return 'http://trakt.tv/search/tvdb/' + this.tvdbId + '?id_type=show';
});