From 91cc65bae22095081308dae3ff0cfc0490301094 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 3 Apr 2013 21:38:51 -0700 Subject: [PATCH] Use small posters from trakt --- UI/AddSeries/New/SearchResultTemplate.html | 2 +- UI/AddSeries/addSeries.css | 6 +----- UI/Series/SeriesModel.js | 14 ++++++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/UI/AddSeries/New/SearchResultTemplate.html b/UI/AddSeries/New/SearchResultTemplate.html index 5d4b9c15d..0af581d69 100644 --- a/UI/AddSeries/New/SearchResultTemplate.html +++ b/UI/AddSeries/New/SearchResultTemplate.html @@ -1,7 +1,7 @@ 
diff --git a/UI/AddSeries/addSeries.css b/UI/AddSeries/addSeries.css index 6b7fbdef5..a74b6b700 100644 --- a/UI/AddSeries/addSeries.css +++ b/UI/AddSeries/addSeries.css @@ -66,8 +66,4 @@ .folder-name-matches { padding-left: 20px; padding-top: 10px; -} - -.series-poster { - height: 200px; -} +} \ No newline at end of file diff --git a/UI/Series/SeriesModel.js b/UI/Series/SeriesModel.js index 08f066162..df4917be9 100644 --- a/UI/Series/SeriesModel.js +++ b/UI/Series/SeriesModel.js @@ -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');