search: fix playlistId on album results
This commit is contained in:
parent
a15d90c4f3
commit
7d062c29cb
1 changed files with 1 additions and 7 deletions
|
|
@ -94,6 +94,7 @@ def parse_search_result(data, search_result_types, result_type, category):
|
|||
|
||||
elif result_type == "album":
|
||||
search_result["type"] = get_item_text(data, 1)
|
||||
search_result["playlistId"] = nav(data, [*PLAY_BUTTON, "playNavigationEndpoint", *WATCH_PID], True)
|
||||
|
||||
elif result_type == "playlist":
|
||||
flex_item = get_flex_column_item(data, 1)["text"]["runs"]
|
||||
|
|
@ -163,13 +164,6 @@ def parse_search_result(data, search_result_types, result_type, category):
|
|||
if result_type in ["song", "album"]:
|
||||
search_result["isExplicit"] = nav(data, BADGE_LABEL, True) is not None
|
||||
|
||||
if result_type in ["album"]:
|
||||
search_result["playlistId"] = nav(
|
||||
data,
|
||||
[*PLAY_BUTTON, "playNavigationEndpoint", "watchEndpoint", "playlistId"],
|
||||
True,
|
||||
)
|
||||
|
||||
if result_type in ["episode"]:
|
||||
flex_item = get_flex_column_item(data, 1)
|
||||
has_date = int(len(nav(flex_item, TEXT_RUNS)) > 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue