Skip to content

Commit 93b0c5b

Browse files
committed
Added seekbar data
1 parent c38a06e commit 93b0c5b

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ public ListLinkHandlerFactory getCommentsLHFactory() {
175175
return YoutubeCommentsLinkHandlerFactory.getInstance();
176176
}
177177

178+
@Override
179+
public StreamExtractor getStreamExtractor(String url) throws ExtractionException {
180+
return super.getStreamExtractor(url);
181+
}
182+
178183
@Override
179184
public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler)
180185
throws ExtractionException {

extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,12 @@ private static StreamInfo extractOptionalData(StreamInfo streamInfo, StreamExtra
335335
streamInfo.addError(e);
336336
}
337337

338+
try {
339+
streamInfo.setFrames(extractor.getFrames());
340+
} catch (Exception e) {
341+
streamInfo.addError(e);
342+
}
343+
338344
streamInfo.setRelatedItems(ExtractorHelper.getRelatedItemsOrLogError(streamInfo, extractor));
339345

340346
return streamInfo;
@@ -386,6 +392,11 @@ private static StreamInfo extractOptionalData(StreamInfo streamInfo, StreamExtra
386392
private List<StreamSegment> streamSegments = new ArrayList<>();
387393
private List<MetaInfo> metaInfo = new ArrayList<>();
388394

395+
/**
396+
* Frames, e.g. for the storyboard / seekbar thumbnail preview
397+
*/
398+
private List<Frameset> frames = new ArrayList<>();
399+
389400
/**
390401
* Get the stream type
391402
*
@@ -711,6 +722,14 @@ public void setMetaInfo(final List<MetaInfo> metaInfo) {
711722
this.metaInfo = metaInfo;
712723
}
713724

725+
public List<Frameset> getFrames() {
726+
return frames;
727+
}
728+
729+
public void setFrames(List<Frameset> frames) {
730+
this.frames = frames;
731+
}
732+
714733
@Nonnull
715734
public List<MetaInfo> getMetaInfo() {
716735
return this.metaInfo;

0 commit comments

Comments
 (0)