diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java index 07db99a3..eaccfd0b 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeService.java @@ -175,6 +175,11 @@ public class YoutubeService extends StreamingService { return YoutubeCommentsLinkHandlerFactory.getInstance(); } + @Override + public StreamExtractor getStreamExtractor(String url) throws ExtractionException { + return super.getStreamExtractor(url); + } + @Override public CommentsExtractor getCommentsExtractor(ListLinkHandler urlIdHandler) throws ExtractionException { diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java b/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java index 56809aa1..99d52371 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/stream/StreamInfo.java @@ -335,6 +335,12 @@ public class StreamInfo extends Info { streamInfo.addError(e); } + try { + streamInfo.setFrames(extractor.getFrames()); + } catch (Exception e) { + streamInfo.addError(e); + } + streamInfo.setRelatedItems(ExtractorHelper.getRelatedItemsOrLogError(streamInfo, extractor)); return streamInfo; @@ -386,6 +392,11 @@ public class StreamInfo extends Info { private List streamSegments = new ArrayList<>(); private List metaInfo = new ArrayList<>(); + /** + * Frames, e.g. for the storyboard / seekbar thumbnail preview + */ + private List frames = new ArrayList<>(); + /** * Get the stream type * @@ -711,6 +722,14 @@ public class StreamInfo extends Info { this.metaInfo = metaInfo; } + public List getFrames() { + return frames; + } + + public void setFrames(List frames) { + this.frames = frames; + } + @Nonnull public List getMetaInfo() { return this.metaInfo;