Skip to content

Commit

Permalink
Fix not parsing full Deezer playlists
Browse files Browse the repository at this point in the history
  • Loading branch information
freyacodes committed Apr 16, 2024
1 parent 32b7986 commit 45f1bb0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,13 @@ private AudioItem getPlaylist(String id, boolean preview) throws IOException {
var artworkUrl = json.get("picture_xl").text();
var author = json.get("creator").get("name").text();

var tracks = this.getJson(PUBLIC_API_BASE + "/playlist/" + id + "/tracks");

return new DeezerAudioPlaylist(json.get("title").text(), this.parseTracks(tracks, preview), DeezerAudioPlaylist.Type.PLAYLIST, json.get("link").text(), artworkUrl, author, (int) json.get("nb_tracks").asLong(0));
return new DeezerAudioPlaylist(json.get("title").text(),
this.parseTracks(json.get("tracks"), preview),
DeezerAudioPlaylist.Type.PLAYLIST,
json.get("link").text(),
artworkUrl,
author,
(int) json.get("nb_tracks").asLong(0));
}

private AudioItem getArtist(String id, boolean preview) throws IOException {
Expand Down

0 comments on commit 45f1bb0

Please sign in to comment.