From 4db1f542e5340bd28c89d2bf7a3650aecabac93f Mon Sep 17 00:00:00 2001 From: Freya Arbjerg Date: Tue, 16 Apr 2024 14:32:09 +0200 Subject: [PATCH] Fix not parsing full Deezer playlists --- .../lavasrc/deezer/DeezerAudioSourceManager.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main/src/main/java/com/github/topi314/lavasrc/deezer/DeezerAudioSourceManager.java b/main/src/main/java/com/github/topi314/lavasrc/deezer/DeezerAudioSourceManager.java index 5fe2b16a..46f9a669 100644 --- a/main/src/main/java/com/github/topi314/lavasrc/deezer/DeezerAudioSourceManager.java +++ b/main/src/main/java/com/github/topi314/lavasrc/deezer/DeezerAudioSourceManager.java @@ -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 {