Use small posters from trakt

pull/4/head
Mark McDowall 12 years ago
parent adaceea0bf
commit 91cc65bae2

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

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

@ -20,17 +20,23 @@
return percent; return percent;
}, },
banner : function () { poster : function () {
var banner = _.find(this.get('images'), function (image) { var poster = _.find(this.get('images'), function (image) {
return image.coverType === 1; return image.coverType === 1;
}); });
if (banner) { if (poster) {
return banner.url; return poster.url;
} }
return undefined; 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 () { traktUrl : function () {
return "http://trakt.tv/show/" + this.get('titleSlug'); return "http://trakt.tv/show/" + this.get('titleSlug');

Loading…
Cancel
Save