1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

Use small posters from trakt

This commit is contained in:
Mark McDowall 2013-04-03 21:38:51 -07:00
parent adaceea0bf
commit 91cc65bae2
3 changed files with 12 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<div class="row">
<div class="span2">
<a href="{{traktUrl}}" target="_blank">
<img class="series-poster img-polaroid" src="{{banner}}">
<img class="series-poster img-polaroid" src="{{smallPoster}}">
</a>
</div>
<div class="span9">

View File

@ -66,8 +66,4 @@
.folder-name-matches {
padding-left: 20px;
padding-top: 10px;
}
.series-poster {
height: 200px;
}
}

View File

@ -20,17 +20,23 @@
return percent;
},
banner : function () {
var banner = _.find(this.get('images'), function (image) {
poster : function () {
var poster = _.find(this.get('images'), function (image) {
return image.coverType === 1;
});
if (banner) {
return banner.url;
if (poster) {
return poster.url;
}
return undefined;
},
smallPoster : function () {
var poster = this.get('poster');
var extension = '.' + poster.split('.').pop();
var withoutExtension = poster.substring(0, poster.length - extension.length);
return withoutExtension + '-138' + extension;
},
traktUrl : function () {
return "http://trakt.tv/show/" + this.get('titleSlug');