NewPipeExtractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistExtractor.java

44 lines
1.5 KiB
Java
Raw Normal View History

package org.schabi.newpipe.extractor.playlist;
2018-02-24 22:20:50 +01:00
import edu.umd.cs.findbugs.annotations.NonNull;
import org.schabi.newpipe.extractor.InfoItemsCollector;
import org.schabi.newpipe.extractor.ListExtractor;
2017-08-06 22:20:15 +02:00
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.UrlIdHandler;
import org.schabi.newpipe.extractor.exceptions.ExtractionException;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
2018-02-24 22:20:50 +01:00
import org.schabi.newpipe.extractor.stream.StreamInfoItemsCollector;
import javax.annotation.Nonnull;
import java.io.IOException;
public abstract class PlaylistExtractor extends ListExtractor {
2018-02-26 16:19:58 +01:00
public PlaylistExtractor(StreamingService service, String url) {
2018-02-26 15:55:27 +01:00
super(service, url);
2017-08-06 22:20:15 +02:00
}
@Nonnull
2017-08-06 22:20:15 +02:00
@Override
2018-02-24 22:20:50 +01:00
protected UrlIdHandler getUrlIdHandler() {
2017-08-06 22:20:15 +02:00
return getService().getPlaylistUrlIdHandler();
}
2018-02-24 22:20:50 +01:00
@NonNull
@Override
public InfoItemsCollector getInfoItems()
throws IOException, ExtractionException {
return getStreams();
}
public abstract StreamInfoItemsCollector getStreams() throws IOException, ExtractionException;
2017-08-08 23:36:11 +02:00
public abstract String getThumbnailUrl() throws ParsingException;
public abstract String getBannerUrl() throws ParsingException;
2017-08-11 03:23:09 +02:00
public abstract String getUploaderUrl() throws ParsingException;
public abstract String getUploaderName() throws ParsingException;
public abstract String getUploaderAvatarUrl() throws ParsingException;
2017-08-11 03:23:09 +02:00
2017-08-06 22:20:15 +02:00
public abstract long getStreamCount() throws ParsingException;
}