Skip to content

Commit

Permalink
[Bandcamp] Null-safe url catenation in track playlist
Browse files Browse the repository at this point in the history
Co-Authored-By: fynngodau <fynngodau@mailbox.org>
  • Loading branch information
ShareASmile and fynngodau committed Jul 28, 2024
1 parent 5fd3ab3 commit 0037b1c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ public String getName() {

@Override
public String getUrl() {
return getUploaderUrl() + track.getString("title_link");
final String relativeUrl = track.getString("title_link");
if (relativeUrl != null) {
return getUploaderUrl() + relativeUrl;
} else {
return null;
}
}

@Override
Expand Down Expand Up @@ -68,7 +73,7 @@ public String getUploaderAvatarUrl() {
*/
@Override
public String getThumbnailUrl() throws ParsingException {
if (substituteCoverUrl != null) {
if (substituteCovers.isEmpty() && getUrl() != null) {
return substituteCoverUrl;
} else {
try {
Expand Down

0 comments on commit 0037b1c

Please sign in to comment.