Merge pull request #401 from Electry/low-res-artwork-option

Add an option to reduce max artwork resolution
This commit is contained in:
Odd Stråbø 2020-09-29 02:48:00 +02:00 committed by GitHub
commit b5404f992e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 []):