only take portrait posters by default from some poster sources, fixes 3034

This commit is contained in:
j 2017-07-26 13:53:39 +02:00
parent 6e7fe215da
commit 12cffaf467
2 changed files with 5 additions and 1 deletions

View file

@ -1398,7 +1398,10 @@ class Item(models.Model):
if not service: if not service:
for service in settings.POSTER_PRECEDENCE: for service in settings.POSTER_PRECEDENCE:
if service in external_posters: 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 return None
def make_timeline(self): def make_timeline(self):

View file

@ -211,6 +211,7 @@ TRACKER_URL = "udp://tracker.openbittorrent.com:80"
DATA_SERVICE = '' DATA_SERVICE = ''
POSTER_PRECEDENCE = () POSTER_PRECEDENCE = ()
POSTER_ONLY_PORTRAIT = ()
USE_IMDB = False USE_IMDB = False