Skip to content

Commit

Permalink
Added seekbar data
Browse files Browse the repository at this point in the history
  • Loading branch information
litetex committed Jun 15, 2021
1 parent 0cb48e3 commit 41cc2b4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ public ListLinkHandlerFactory getCommentsLHFactory() {
return YoutubeCommentsLinkHandlerFactory.getInstance();
}

@Override
public StreamExtractor getStreamExtractor(String url) throws ExtractionException {
return super.getStreamExtractor(url);
}

@Override
public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler)
throws ExtractionException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ private static StreamInfo extractOptionalData(StreamInfo streamInfo, StreamExtra
streamInfo.addError(e);
}

try {
streamInfo.setFrames(extractor.getFrames());
} catch (Exception e) {
streamInfo.addError(e);
}

streamInfo.setRelatedItems(ExtractorHelper.getRelatedItemsOrLogError(streamInfo, extractor));

return streamInfo;
Expand Down Expand Up @@ -386,6 +392,11 @@ private static StreamInfo extractOptionalData(StreamInfo streamInfo, StreamExtra
private List<StreamSegment> streamSegments = 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
*
Expand Down Expand Up @@ -711,6 +722,14 @@ public void setMetaInfo(final List<MetaInfo> metaInfo) {
this.metaInfo = metaInfo;
}

public List<Frameset> getFrames() {
return frames;
}

public void setFrames(List<Frameset> frames) {
this.frames = frames;
}

@Nonnull
public List<MetaInfo> getMetaInfo() {
return this.metaInfo;
Expand Down

0 comments on commit 41cc2b4

Please sign in to comment.