Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not parsing full Deezer playlists #182

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,16 @@ 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));
// This endpoint returns tracks with ISRC, unlike the other REST call
var tracks = this.getJson(PUBLIC_API_BASE + "/playlist/" + id + "/tracks?limit=10000");

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));
}

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