Skip to content

Commit

Permalink
Fix NPE when searching by isrc (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blad3Mak3r authored Oct 10, 2022
1 parent 35f26bf commit 3b3cb9f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private AudioTrack parseTrack(JsonBrowser json) {

private AudioItem getTrackByISRC(String isrc) throws IOException {
var json = this.getJson(PUBLIC_API_BASE + "/track/isrc:" + isrc);
if (json == null) {
if (json == null || json.get("id").isNull()) {
return AudioReference.NO_TRACK;
}
return this.parseTrack(json);
Expand Down

0 comments on commit 3b3cb9f

Please sign in to comment.