From 86b9e05c90c2fb1dd89fc6d46ad768509b12b7cf Mon Sep 17 00:00:00 2001 From: sigma67 Date: Tue, 20 Feb 2024 08:56:26 +0100 Subject: [PATCH] Revert "get_playlist: fix albums on tracks" This reverts commit b2113db0e15cbc9bec2e1c308bf4c144fb48a937. --- ytmusicapi/parsers/playlists.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ytmusicapi/parsers/playlists.py b/ytmusicapi/parsers/playlists.py index 13d573e..bf0182c 100644 --- a/ytmusicapi/parsers/playlists.py +++ b/ytmusicapi/parsers/playlists.py @@ -46,9 +46,13 @@ def parse_playlist_items(results, menu_entries: Optional[List[List]] = None, is_ artists = parse_song_artists(data, 1) - album = parse_song_album(data, 3) + album = parse_song_album(data, 2) - views = get_item_text(data, 2) + views = None + if album and album["id"] is None: + # views currently only present on albums and formatting is localization-dependent -> no parsing + if (views := (get_item_text(data, 2))) is not None: + album = None duration = None if "fixedColumns" in data: