From 12cffaf467d9e021bbf3243dea8da70375fbee87 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 26 Jul 2017 13:53:39 +0200 Subject: [PATCH] only take portrait posters by default from some poster sources, fixes 3034 --- pandora/item/models.py | 5 ++++- pandora/settings.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index bbd8ce194..fc59a499f 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1398,7 +1398,10 @@ class Item(models.Model): if not service: for service in settings.POSTER_PRECEDENCE: if service in external_posters: - return external_posters[service][0]['url'] + for p in external_posters[service]: + if service in settings.POSTER_ONLY_PORTRAIT and p['width'] > p['height']: + continue + return p['url'] return None def make_timeline(self): diff --git a/pandora/settings.py b/pandora/settings.py index e0b31b4e1..0e68b631a 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -211,6 +211,7 @@ TRACKER_URL = "udp://tracker.openbittorrent.com:80" DATA_SERVICE = '' POSTER_PRECEDENCE = () +POSTER_ONLY_PORTRAIT = () USE_IMDB = False