File tree Expand file tree Collapse file tree
extractor/src/main/java/org/schabi/newpipe/extractor
services/youtube/extractors/kiosk Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package org .schabi .newpipe .extractor .exceptions ;
2+
3+ /**
4+ * Exception for contents not supported in a country.
5+ *
6+ * <p>
7+ * Unsupported content means content is not intentionally geographically restricted such as for
8+ * distribution rights, for which {@link GeographicRestrictionException} should be used instead.
9+ * </p>
10+ */
11+ public class UnsupportedContentInCountryException extends ContentNotAvailableException {
12+
13+ public UnsupportedContentInCountryException (final String message ) {
14+ super (message );
15+ }
16+
17+ public UnsupportedContentInCountryException (final String message , final Throwable cause ) {
18+ super (message , cause );
19+ }
20+ }
Original file line number Diff line number Diff line change 22
33import org .schabi .newpipe .extractor .StreamingService ;
44import org .schabi .newpipe .extractor .downloader .Downloader ;
5- import org .schabi .newpipe .extractor .exceptions .ContentNotSupportedException ;
65import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
76import org .schabi .newpipe .extractor .exceptions .ParsingException ;
7+ import org .schabi .newpipe .extractor .exceptions .UnsupportedContentInCountryException ;
88import org .schabi .newpipe .extractor .linkhandler .ListLinkHandler ;
99
1010import javax .annotation .Nonnull ;
@@ -23,7 +23,7 @@ public void onFetchPage(@Nonnull final Downloader downloader)
2323 throws IOException , ExtractionException {
2424 if (!YT_CHARTS_SUPPORTED_COUNTRY_CODES .contains (
2525 getExtractorContentCountry ().getCountryCode ())) {
26- throw new ContentNotSupportedException (
26+ throw new UnsupportedContentInCountryException (
2727 "YouTube Charts doesn't support this country for trending music videos charts" );
2828 }
2929 super .onFetchPage (downloader );
You can’t perform that action at this time.
0 commit comments