Merge pull request #1200 from TeamNewPipe/bandcamp-fix-null-url-catenation

[Bandcamp] Null-safe url catenation in track playlist
This commit is contained in:
Tobi 2024-07-22 08:26:16 +02:00 committed by GitHub
commit 87af6bb223
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -43,7 +43,12 @@ public class BandcampPlaylistStreamInfoItemExtractor extends BandcampStreamInfoI
@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
@ -66,7 +71,7 @@ public class BandcampPlaylistStreamInfoItemExtractor extends BandcampStreamInfoI
@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();