settings: Add an option to reduce max artwork resolution

This commit is contained in:
Michal Chvíla 2020-09-15 21:38:38 +02:00
parent 9daa9eed13
commit 204f50fa2e
3 changed files with 10 additions and 0 deletions

View file

@ -263,6 +263,11 @@ class API(object):
if not settings('enableCoverArt.bool'):
query += "&EnableImageEnhancers=false"
art_maxheight = [360, 480, 600, 720, 1080, -1]
maxheight = art_maxheight[int(settings('maxArtResolution') or 5)]
if maxheight != -1:
query += "&MaxHeight=%d" % maxheight
all_artwork['Backdrop'] = self.get_backdrops(obj['Id'], obj['BackdropTags'] or [], query)
for artwork in (obj['Tags'] or []):