Skip to content

Commit 730b766

Browse files
committed
Fix for newer artists only having hdlogos
1 parent 2e1a86b commit 730b766

File tree

5 files changed

+27
-18
lines changed

5 files changed

+27
-18
lines changed

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="script.cdartmanager"
33
name="cdART Manager"
4-
version="4.1.0"
4+
version="4.1.1"
55
provider-name="stef.an">
66
<requires>
77
<import addon="xbmc.python" version="2.19.0"/>

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
4.1.1
2+
- Fix: fanart.tv deprecated non-hd-clearart for artists, causing the download to crash under certain circumstances
3+
14
4.1.0
25
- first "official" release by stef.an
36
- compatible with Helix and newer releases of Kodi

default.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
__dbversionancient__ = "1.5.3"
3939
__addon_path__ = __addon__.getAddonInfo('path')
4040
__useragent__ = "%s\\%s (https://github.com/stefansielaff/script.cdartmanager)" % (__scriptname__, __version__)
41-
enable_hdlogos = eval(__addon__.getSetting("enable_hdlogos"))
41+
# enable_hdlogos = eval(__addon__.getSetting("enable_hdlogos"))
42+
enable_hdlogos = True # fanart.tv has deprecated low res art, so we always pefer hd from now on
4243
mbid_match_number = int(__addon__.getSetting("mbid_match_number"))
4344
use_musicbrainz = eval(__addon__.getSetting("use_musicbrainz"))
4445
musicbrainz_server = __addon__.getSetting("musicbrainz_server")

resources/lib/download.py

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,16 @@ def auto_download(type, artist_list, background=False):
310310
if type == "fanart":
311311
art = remote_fanart_list(auto_art)
312312
elif type == "clearlogo":
313-
art = remote_clearlogo_list(auto_art)
314-
arthd = remote_hdlogo_list(auto_art)
313+
# art = remote_clearlogo_list(auto_art)
314+
# arthd = remote_hdlogo_list(auto_art)
315+
art = remote_hdlogo_list(auto_art)
316+
if not art:
317+
art = remote_clearlogo_list(auto_art)
315318
elif type == "musicbanner":
316319
art = remote_banner_list(auto_art)
317320
else:
318321
art = remote_artistthumb_list(auto_art)
319-
if art or arthd:
322+
if art:
320323
if type == "fanart":
321324
temp_art["path"] = path
322325
auto_art["path"] = os.path.join(path, "extrafanart").replace("\\\\", "\\")
@@ -368,13 +371,14 @@ def auto_download(type, artist_list, background=False):
368371
log(" Path: %s" % auto_art["path"], xbmc.LOGDEBUG)
369372
d_error = True
370373
else:
371-
if type == "clearlogo":
372-
if arthd and enable_hdlogos:
373-
artwork = arthd[0]
374-
else:
375-
artwork = art[0]
376-
else:
377-
artwork = art[0]
374+
# if type == "clearlogo":
375+
# if arthd and enable_hdlogos:
376+
# artwork = arthd[0]
377+
# else:
378+
# artwork = art[0]
379+
# else:
380+
# artwork = art[0]
381+
artwork = art[0]
378382
if type == "artistthumb":
379383
if resizeondownload:
380384
low_res = check_size(auto_art["path"], key_label, 1000, 1000)
@@ -390,11 +394,12 @@ def auto_download(type, artist_list, background=False):
390394
"artistthumb", "auto",
391395
0, background)
392396
elif type == "clearlogo":
393-
if enable_hdlogos and resizeondownload and arthd:
394-
low_res = check_size(auto_art["path"], key_label, 800, 310)
395-
else:
396-
low_res = False
397-
if exists(os.path.join(auto_art["path"], "logo.png")) and not low_res:
397+
# if enable_hdlogos and resizeondownload and arthd:
398+
# low_res = check_size(auto_art["path"], key_label, 800, 310)
399+
# else:
400+
# low_res = False
401+
# if exists(os.path.join(auto_art["path"], "logo.png")) and not low_res:
402+
if exists(os.path.join(auto_art["path"], "logo.png")):
398403
log("ClearLOGO already exists, skipping", xbmc.LOGDEBUG)
399404
continue
400405
else:

resources/settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
<setting label="32176" type="text" id="illegal_characters" visible="eq(-1,true)" default=":*&lt;&gt;/\|?&quot;" />
3838
<setting label="32177" type="text" id="replace_character" visible="eq(-2,true)" default="_" />
3939
<setting label="32180" type="bool" id="change_period_atend" visible="eq(-3,true)" default="true" />
40-
<setting label="32171" type="bool" id="enable_hdlogos" default="true" />
4140
<setting label="32183" type="bool" id="enable_fanart_limit" default="false" />
4241
<setting label="32184" type="slider" id="fanart_limit" option="int" visible="eq(-1,true)" range="1,60" default="10" />
4342
<setting type="sep" />
@@ -56,5 +55,6 @@
5655
<setting label="32190" type="slider" id="mb_delay" option="int" visible="eq(-2,false)" range="0,9" default="9" />
5756
<setting type="sep" />
5857
<setting label="32106" type="bool" id="resizeondownload" default="false" enable="false"/>
58+
<setting label="32171" type="bool" id="enable_hdlogos" default="true" enabled="false" />
5959
</category>
6060
</settings>

0 commit comments

Comments
 (0)