Skip to content

Commit b60f15a

Browse files
authored
Merge pull request #350 from blacklight/349/a-more-robust-parse-playlist
fix(playlist): More robust handling of the passed objects.
2 parents 07a3353 + fafad38 commit b60f15a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tidalapi/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def parse_v2_mix(self, obj: JsonObj) -> mix.Mix:
361361
def parse_playlist(self, obj: JsonObj) -> playlist.Playlist:
362362
"""Parse a playlist from the given response."""
363363
# Note: When parsing playlists from v2 response, "data" field must be parsed
364-
return self.playlist().parse(obj["data"])
364+
return self.playlist().parse(obj.get("data", obj))
365365

366366
def parse_folder(self, obj: JsonObj) -> playlist.Folder:
367367
"""Parse an album from the given response."""

0 commit comments

Comments
 (0)