Skip to content

Commit

Permalink
remove forgotten readable checks in deezer
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Jul 10, 2023
1 parent 64784ac commit 30ab086
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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 || json.get("id").isNull() || !json.get("readable").as(Boolean.class)) {
if (json == null || json.get("id").isNull()) {
return AudioReference.NO_TRACK;
}
return this.parseTrack(json);
Expand All @@ -179,7 +179,7 @@ private AudioItem getAlbum(String id) throws IOException {

private AudioItem getTrack(String id) throws IOException {
var json = this.getJson(PUBLIC_API_BASE + "/track/" + id);
if (json == null || !json.get("readable").as(Boolean.class)) {
if (json == null) {
return AudioReference.NO_TRACK;
}
return this.parseTrack(json);
Expand Down

0 comments on commit 30ab086

Please sign in to comment.