22
33import org .schabi .newpipe .extractor .channel .ChannelExtractor ;
44import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
5+ import org .schabi .newpipe .extractor .playlist .PlayListExtractor ;
56import org .schabi .newpipe .extractor .search .SearchEngine ;
67import org .schabi .newpipe .extractor .stream_info .StreamExtractor ;
78
@@ -52,8 +53,11 @@ public abstract StreamExtractor getExtractorInstance(String url)
5253 public abstract SearchEngine getSearchEngineInstance ();
5354 public abstract UrlIdHandler getStreamUrlIdHandlerInstance ();
5455 public abstract UrlIdHandler getChannelUrlIdHandlerInstance ();
56+ public abstract UrlIdHandler getPlayListUrlIdHandlerInstance ();
5557 public abstract ChannelExtractor getChannelExtractorInstance (String url , int page )
5658 throws ExtractionException , IOException ;
59+ public abstract PlayListExtractor getPlayListExtractorInstance (String url , int page )
60+ throws ExtractionException , IOException ;
5761 public abstract SuggestionExtractor getSuggestionExtractorInstance ();
5862
5963 public final int getServiceId () {
@@ -66,11 +70,14 @@ public final int getServiceId() {
6670 public final LinkType getLinkTypeByUrl (String url ) {
6771 UrlIdHandler sH = getStreamUrlIdHandlerInstance ();
6872 UrlIdHandler cH = getChannelUrlIdHandlerInstance ();
73+ UrlIdHandler pH = getPlayListUrlIdHandlerInstance ();
6974
7075 if (sH .acceptUrl (url )) {
7176 return LinkType .STREAM ;
7277 } else if (cH .acceptUrl (url )) {
7378 return LinkType .CHANNEL ;
79+ } else if (pH .acceptUrl (url )) {
80+ return LinkType .PLAYLIST ;
7481 } else {
7582 return LinkType .NONE ;
7683 }
0 commit comments