[Bandcamp] Throw PaidContentException on paywalled albums

This commit is contained in:
petlyh 2023-04-03 19:27:09 +02:00
parent 9dc1832733
commit e6aad117e7
No known key found for this signature in database
GPG Key ID: 0E7BACA438DF2505
1 changed files with 2 additions and 2 deletions

View File

@ -14,8 +14,8 @@ import org.jsoup.nodes.Document;
import org.schabi.newpipe.extractor.Page; import org.schabi.newpipe.extractor.Page;
import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.downloader.Downloader; import org.schabi.newpipe.extractor.downloader.Downloader;
import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException;
import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.exceptions.PaidContentException;
import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
import org.schabi.newpipe.extractor.playlist.PlaylistExtractor; import org.schabi.newpipe.extractor.playlist.PlaylistExtractor;
@ -64,7 +64,7 @@ public class BandcampPlaylistExtractor extends PlaylistExtractor {
if (trackInfo.isEmpty()) { if (trackInfo.isEmpty()) {
// Albums without trackInfo need to be purchased before they can be played // Albums without trackInfo need to be purchased before they can be played
throw new ContentNotAvailableException("Album needs to be purchased"); throw new PaidContentException("Album needs to be purchased");
} }
} }