Fix key error for artist pages caused by removal of video title link (server-side change)

This commit is contained in:
sigma67 2020-05-19 12:00:53 +02:00
commit 20e44873d3
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
2 changed files with 3 additions and 2 deletions

View file

@ -12,6 +12,7 @@ PLAY_BUTTON = [
]
NAVIGATION_BROWSE_ID = ['navigationEndpoint', 'browseEndpoint', 'browseId']
NAVIGATION_VIDEO_ID = ['navigationEndpoint', 'watchEndpoint', 'videoId']
NAVIGATION_PLAYLIST_ID = ['navigationEndpoint', 'watchEndpoint', 'playlistId']
CAROUSEL_TITLE = ['header', 'musicCarouselShelfBasicHeaderRenderer', 'title', 'runs', 0]
FRAMEWORK_MUTATIONS = ['frameworkUpdates', 'entityBatchUpdate', 'mutations']
TITLE = ['title', 'runs', 0]

View file

@ -299,8 +299,8 @@ class YTMusic:
result['browseId'] = nav(item, TITLE + NAVIGATION_BROWSE_ID)
elif category == 'videos':
result['views'] = nav(item, SUBTITLE2).split(' ')[0]
result['videoId'] = nav(item, TITLE + NAVIGATION_VIDEO_ID)
result['playlistId'] = nav(item, TITLE + NAVIGATION_VIDEO_ID)
result['videoId'] = nav(item, NAVIGATION_VIDEO_ID)
result['playlistId'] = nav(item, NAVIGATION_PLAYLIST_ID)
artist[category]['results'].append(result)
return artist