Fixed KeyError: 'runs' if album has no year
This commit is contained in:
parent
15e1b69698
commit
14b687166a
1 changed files with 24 additions and 22 deletions
|
|
@ -48,6 +48,8 @@ def parse_albums(results):
|
|||
album['browseId'] = nav(data, TITLE + NAVIGATION_BROWSE_ID)
|
||||
album['title'] = nav(data, TITLE_TEXT)
|
||||
album['thumbnails'] = nav(data, THUMBNAIL_RENDERER)
|
||||
|
||||
if 'runs' in data['subtitle']:
|
||||
run_count = len(data['subtitle']['runs'])
|
||||
has_artists = False
|
||||
if run_count == 1:
|
||||
|
|
|
|||
Loading…
Reference in a new issue