From 204f50fa2eae1f51253fcf7690cdd915292c8579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Chv=C3=ADla?= Date: Tue, 15 Sep 2020 21:38:38 +0200 Subject: [PATCH] settings: Add an option to reduce max artwork resolution --- jellyfin_kodi/helper/api.py | 5 +++++ resources/language/resource.language.en_gb/strings.po | 4 ++++ resources/settings.xml | 1 + 3 files changed, 10 insertions(+) diff --git a/jellyfin_kodi/helper/api.py b/jellyfin_kodi/helper/api.py index b85ce61e..7ecf80ad 100644 --- a/jellyfin_kodi/helper/api.py +++ b/jellyfin_kodi/helper/api.py @@ -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 []): diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index c4690526..507ee890 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -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" diff --git a/resources/settings.xml b/resources/settings.xml index e141b9ac..bea5561d 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -29,6 +29,7 @@ +