Skip to content

Commit

Permalink
don't fail on missing setVideoId/removedVideoId (closes #462, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Oct 24, 2023
1 parent 7382f62 commit 2d2ab99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ytmusicapi/parsers/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ def parse_playlist_items(results, menu_entries: List[List] = None):
if 'menuServiceItemRenderer' in item:
menu_service = nav(item, MENU_SERVICE)
if 'playlistEditEndpoint' in menu_service:
setVideoId = menu_service['playlistEditEndpoint']['actions'][0][
'setVideoId']
videoId = menu_service['playlistEditEndpoint']['actions'][0][
'removedVideoId']
setVideoId = nav(menu_service, ['playlistEditEndpoint', 'actions', 0, 'setVideoId'], True)
videoId = nav(menu_service, ['playlistEditEndpoint', 'actions', 0, 'removedVideoId'], True)

if TOGGLE_MENU in item:
feedback_tokens = parse_song_menu_tokens(item)
Expand Down

0 comments on commit 2d2ab99

Please sign in to comment.