Added seekbar data

This commit is contained in:
litetex 2021-06-05 00:34:54 +02:00
parent c38a06e8dc
commit 93b0c5b15f
2 changed files with 24 additions and 0 deletions

View File

@ -175,6 +175,11 @@ public class YoutubeService extends StreamingService {
return YoutubeCommentsLinkHandlerFactory.getInstance(); return YoutubeCommentsLinkHandlerFactory.getInstance();
} }
@Override
public StreamExtractor getStreamExtractor(String url) throws ExtractionException {
return super.getStreamExtractor(url);
}
@Override @Override
public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler) public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler)
throws ExtractionException { throws ExtractionException {

View File

@ -335,6 +335,12 @@ public class StreamInfo extends Info {
streamInfo.addError(e); streamInfo.addError(e);
} }
try {
streamInfo.setFrames(extractor.getFrames());
} catch (Exception e) {
streamInfo.addError(e);
}
streamInfo.setRelatedItems(ExtractorHelper.getRelatedItemsOrLogError(streamInfo, extractor)); streamInfo.setRelatedItems(ExtractorHelper.getRelatedItemsOrLogError(streamInfo, extractor));
return streamInfo; return streamInfo;
@ -386,6 +392,11 @@ public class StreamInfo extends Info {
private List<StreamSegment> streamSegments = new ArrayList<>(); private List<StreamSegment> streamSegments = new ArrayList<>();
private List<MetaInfo> metaInfo = new ArrayList<>(); private List<MetaInfo> metaInfo = new ArrayList<>();
/**
* Frames, e.g. for the storyboard / seekbar thumbnail preview
*/
private List<Frameset> frames = new ArrayList<>();
/** /**
* Get the stream type * Get the stream type
* *
@ -711,6 +722,14 @@ public class StreamInfo extends Info {
this.metaInfo = metaInfo; this.metaInfo = metaInfo;
} }
public List<Frameset> getFrames() {
return frames;
}
public void setFrames(List<Frameset> frames) {
this.frames = frames;
}
@Nonnull @Nonnull
public List<MetaInfo> getMetaInfo() { public List<MetaInfo> getMetaInfo() {
return this.metaInfo; return this.metaInfo;