From b630b84ab0fb333c1b5bc2fc69857a381dcbf106 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 31 May 2014 12:09:55 +0200 Subject: [PATCH] Get proper poster image from tmdb --- .../core/media/movie/providers/info/themoviedb.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/couchpotato/core/media/movie/providers/info/themoviedb.py b/couchpotato/core/media/movie/providers/info/themoviedb.py index 35fae5e9..9b002af9 100644 --- a/couchpotato/core/media/movie/providers/info/themoviedb.py +++ b/couchpotato/core/media/movie/providers/info/themoviedb.py @@ -105,7 +105,7 @@ class TheMovieDb(MovieProvider): if not movie_data: # Images - poster = self.getImage(movie, type = 'poster', size = 'poster') + poster = self.getImage(movie, type = 'poster', size = 'w154') poster_original = self.getImage(movie, type = 'poster', size = 'original') backdrop_original = self.getImage(movie, type = 'backdrop', size = 'original') extra_thumbs = self.getMultImages(movie, type = 'backdrops', size = 'original', n = self.MAX_EXTRATHUMBS, skipfirst = True) @@ -181,12 +181,12 @@ class TheMovieDb(MovieProvider): log.debug('Failed getting %s.%s for "%s"', (type, size, ss(str(movie)))) return image_url - + def getMultImages(self, movie, type = 'backdrops', size = 'original', n = -1, skipfirst = False): """ - If n < 0, return all images. Otherwise return n images. + If n < 0, return all images. Otherwise return n images. If n > len(getattr(movie, type)), then return all images. - If skipfirst is True, then it will skip getattr(movie, type)[0]. This + If skipfirst is True, then it will skip getattr(movie, type)[0]. This is because backdrops[0] is typically backdrop. """ @@ -200,7 +200,7 @@ class TheMovieDb(MovieProvider): for i in range(int(skipfirst), num_images + int(skipfirst)): image_urls.append(images[i].geturl(size = size)) - + except: log.debug('Failed getting %i %s.%s for "%s"', (n, type, size, ss(str(movie))))