* fix #743: get_album() now returns None for 'audioPlaylistId' * backwards compatibility
This commit is contained in:
parent
c60950a2f4
commit
5e3bc62620
1 changed files with 8 additions and 1 deletions
|
|
@ -64,9 +64,16 @@ def parse_album_header_2024(response):
|
|||
buttons = header["buttons"]
|
||||
album["audioPlaylistId"] = nav(
|
||||
find_object_by_key(buttons, "musicPlayButtonRenderer"),
|
||||
["musicPlayButtonRenderer", "playNavigationEndpoint", *WATCH_PLAYLIST_ID],
|
||||
["musicPlayButtonRenderer", "playNavigationEndpoint", *WATCH_PID],
|
||||
True,
|
||||
)
|
||||
# remove this once A/B testing is finished and it is no longer covered
|
||||
if album["audioPlaylistId"] is None:
|
||||
album["audioPlaylistId"] = nav(
|
||||
find_object_by_key(buttons, "musicPlayButtonRenderer"),
|
||||
["musicPlayButtonRenderer", "playNavigationEndpoint", *WATCH_PLAYLIST_ID],
|
||||
True,
|
||||
)
|
||||
service = nav(
|
||||
find_object_by_key(buttons, "toggleButtonRenderer"),
|
||||
["toggleButtonRenderer", "defaultServiceEndpoint"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue