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 []):

View file

@ -944,3 +944,7 @@ msgstr "Select the libraries to repair"
msgctxt "#33200"
msgid "Select the libraries to remove"
msgstr "Select the libraries to remove"
msgctxt "#33201"
msgid "Max artwork resolution"
msgstr "Max artwork resolution"

View file

@ -29,6 +29,7 @@
<setting label="33176" type="lsep" />
<setting label="30157" id="enableCoverArt" type="bool" default="true" />
<setting label="33116" id="compressArt" type="bool" default="false" />
<setting label="33201" id="maxArtResolution" type="enum" values="360|480|600|720|1080|Unlimited [default]" default="5" />
<setting id="enableMusic" visible="false" default="false" />
</category>