From 0037b1c6b074102c5f758276e563a958ab1cc8c3 Mon Sep 17 00:00:00 2001 From: ShareASmile <60492161+ShareASmile@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:34:03 +0530 Subject: [PATCH] [Bandcamp] Null-safe url catenation in track playlist Co-Authored-By: fynngodau --- .../BandcampPlaylistStreamInfoItemExtractor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampPlaylistStreamInfoItemExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampPlaylistStreamInfoItemExtractor.java index 1b2e7e886c..96c9faa000 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampPlaylistStreamInfoItemExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/bandcamp/extractors/streaminfoitem/BandcampPlaylistStreamInfoItemExtractor.java @@ -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 @@ -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 {