Skip to content

Commit

Permalink
Merge pull request #1200 from TeamNewPipe/bandcamp-fix-null-url-caten…
Browse files Browse the repository at this point in the history
…ation

[Bandcamp] Null-safe url catenation in track playlist
  • Loading branch information
TobiGr authored Jul 22, 2024
2 parents 4aaab63 + 97955e5 commit 87af6bb
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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 All @@ -66,7 +71,7 @@ public String getUploaderName() {
@Nonnull
@Override
public List<Image> getThumbnails() throws ParsingException {
if (substituteCovers.isEmpty()) {
if (substituteCovers.isEmpty() && getUrl() != null) {
try {
final StreamExtractor extractor = service.getStreamExtractor(getUrl());
extractor.fetchPage();
Expand Down

0 comments on commit 87af6bb

Please sign in to comment.