Skip to content

Commit

Permalink
Fix ttvdb.py to get coverarts for seasons.
Browse files Browse the repository at this point in the history
Fetching the coverart with the scrip ttvdb.py fails,
if the artwork is listed in data['_banners']['season'],
but the section data['_banners']['poster'] is missing.
In this case, the xslt transformation does not work as expected.

Checked with ttvdb.py -l de -a CH -D 89901 36 4
  • Loading branch information
rcrdnalor committed Dec 8, 2020
1 parent cc9b462 commit 8d6eaf2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mythtv/programs/scripts/metadata/Television/ttvdb.py
Expand Up @@ -2068,6 +2068,13 @@ def series_images_item_func(parent):
return "Banner"
for show_id in t.shows.keys():
break

# dict for 'data['_banners']['poster']['raw'] must exist for fetching coverarts,
# check with ttvdb.py -l de -a CH -D 89901 36 4
if 'poster' not in t.shows[show_id].data['_banners'].keys():
t.shows[show_id].data['_banners']['poster'] = {}
t.shows[show_id].data['_banners']['poster']['raw'] = {}

# sort the cast into sort order
t.shows[show_id].data['_actors'] = sorted(t.shows[show_id].data['_actors'], key=lambda k: k['sortOrder'])
t.searchTree = None
Expand Down

0 comments on commit 8d6eaf2

Please sign in to comment.