get_history: raise exception if watch history is disabled
This commit is contained in:
parent
878ae9a9bf
commit
3043116d69
1 changed files with 4 additions and 1 deletions
|
|
@ -199,7 +199,10 @@ class LibraryMixin:
|
||||||
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST)
|
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST)
|
||||||
songs = []
|
songs = []
|
||||||
for content in results:
|
for content in results:
|
||||||
data = content['musicShelfRenderer']['contents']
|
data = nav(content, MUSIC_SHELF + ['contents'], True)
|
||||||
|
if not data:
|
||||||
|
error = nav(content, ['musicNotifierShelfRenderer'] + TITLE, True)
|
||||||
|
raise Exception(error)
|
||||||
menu_entries = [[-1] + MENU_SERVICE + FEEDBACK_TOKEN]
|
menu_entries = [[-1] + MENU_SERVICE + FEEDBACK_TOKEN]
|
||||||
songlist = parse_playlist_items(data, menu_entries)
|
songlist = parse_playlist_items(data, menu_entries)
|
||||||
for song in songlist:
|
for song in songlist:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue