diff --git a/ytmusicapi/parsers/albums.py b/ytmusicapi/parsers/albums.py index 5d2aed1..84c35cf 100644 --- a/ytmusicapi/parsers/albums.py +++ b/ytmusicapi/parsers/albums.py @@ -25,7 +25,9 @@ def parse_album_header(response): # add to library/uploaded menu = nav(header, MENU) toplevel = menu['topLevelButtons'] - album['audioPlaylistId'] = nav(toplevel, [0, 'buttonRenderer'] + NAVIGATION_WATCH_PLAYLIST_ID) + album['audioPlaylistId'] = nav(toplevel, [0, 'buttonRenderer'] + NAVIGATION_WATCH_PLAYLIST_ID, True) + if not album['audioPlaylistId']: + album['audioPlaylistId'] = nav(toplevel, [0, 'buttonRenderer'] + NAVIGATION_PLAYLIST_ID, True) service = nav(toplevel, [1, 'buttonRenderer', 'defaultServiceEndpoint'], True) if service: album['likeStatus'] = parse_like_status(service)