added isCommentsSupported method

This commit is contained in:
Ritvik Saraf 2018-09-23 01:12:11 +05:30
parent 0e86475891
commit c1199c8fcf
3 changed files with 12 additions and 3 deletions

View File

@ -92,6 +92,7 @@ public abstract class StreamingService {
public abstract PlaylistExtractor getPlaylistExtractor(ListLinkHandler urlIdHandler) throws ExtractionException;
public abstract StreamExtractor getStreamExtractor(LinkHandler UIHFactory) throws ExtractionException;
public abstract CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler) throws ExtractionException;
public abstract boolean isCommentsSupported();
public SearchExtractor getSearchExtractor(String query, List<String> contentFilter, String sortFilter, String contentCountry) throws ExtractionException {
return getSearchExtractor(getSearchQHFactory().fromQuery(query, contentFilter, sortFilter), contentCountry);

View File

@ -102,13 +102,16 @@ public class SoundcloudService extends StreamingService {
@Override
public ListLinkHandlerFactory getCommentsLHFactory() {
// TODO Auto-generated method stub
return null;
}
@Override
public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler) throws ExtractionException {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isCommentsSupported() {
return false;
}
}

View File

@ -146,4 +146,9 @@ public class YoutubeService extends StreamingService {
return new YoutubeCommentsExtractor(this, urlIdHandler);
}
@Override
public boolean isCommentsSupported() {
return true;
}
}