1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-29 11:05:44 +00:00

Only use resized posters when the images are served from Sonarr.

This commit is contained in:
Taloth Saldono 2015-02-01 23:13:17 +01:00
parent 23205574a3
commit 7c38fcb9f3

View file

@ -11,7 +11,11 @@ define(
var poster = _.where(this.images, {coverType: 'poster'});
if (poster[0]) {
return new Handlebars.SafeString('<img class="series-poster" {0}>'.format(Handlebars.helpers.defaultImg.call(null, poster[0].url, 250)));
if (!poster[0].url.match(/^https?:\/\//)) {
return new Handlebars.SafeString('<img class="series-poster" {0}>'.format(Handlebars.helpers.defaultImg.call(null, poster[0].url, 250)));
} else {
return new Handlebars.SafeString('<img class="series-poster" {0}>'.format(Handlebars.helpers.defaultImg.call(null, poster[0].url)));
}
}
return new Handlebars.SafeString('<img class="series-poster placeholder-image" src="{0}">'.format(placeholder));