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

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>