diff --git a/main/src/main/java/com/github/topi314/lavasrc/applemusic/AppleMusicSourceManager.java b/main/src/main/java/com/github/topi314/lavasrc/applemusic/AppleMusicSourceManager.java index 7740c04c..c4cb7db4 100644 --- a/main/src/main/java/com/github/topi314/lavasrc/applemusic/AppleMusicSourceManager.java +++ b/main/src/main/java/com/github/topi314/lavasrc/applemusic/AppleMusicSourceManager.java @@ -411,7 +411,12 @@ public AudioItem getSong(String id, String countryCode, boolean preview) throws private List parseTracks(JsonBrowser json, boolean preview, Map artistArtwork) { var tracks = new ArrayList(); for (var value : json.get("data").values()) { - tracks.add(this.parseTrack(value, preview, artistArtwork.get(this.parseArtistId(value)))); + var artistId = this.parseArtistId(value); + String artworkUrl = null; + if (artistId != null) { + artworkUrl = artistArtwork.get(artistId); + } + tracks.add(this.parseTrack(value, preview, artworkUrl)); } return tracks; }