From 542867ff4d5043d803d95d83ba14ff7fb7d3fff0 Mon Sep 17 00:00:00 2001 From: Thompson3142 <115718208+Thompson3142@users.noreply.github.com> Date: Thu, 24 Oct 2024 19:36:35 +0200 Subject: [PATCH 1/2] Add documentation for faulty framesets --- .../services/youtube/extractors/YoutubeStreamExtractor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index e6fb7c1b4a..9623baea19 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -1377,6 +1377,11 @@ private ItagInfo buildAndAddItagInfoToList( return itagInfo; } + // Warning: When using this method be aware that the YouTube API very rarely returns framesets, + // that are slightly too small e.g. framesPerPageX = 5, frameWidth = 160, but the url contains + // a storyboard that is only 795 pixels wide (5*160 > 795). You will need to handle this + // "manually" to avoid errors. + // For further reference see: https://github.com/TeamNewPipe/NewPipe/pull/11596 @Nonnull @Override public List getFrames() throws ExtractionException { From 1f26c120988e35e4eea5c5c24d74fb90c774443f Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sun, 27 Oct 2024 09:34:39 +0100 Subject: [PATCH 2/2] Use JDoc and inherit doc --- .../extractors/YoutubeStreamExtractor.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index 9623baea19..1c19bbda9a 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -1377,11 +1377,20 @@ private ItagInfo buildAndAddItagInfoToList( return itagInfo; } - // Warning: When using this method be aware that the YouTube API very rarely returns framesets, - // that are slightly too small e.g. framesPerPageX = 5, frameWidth = 160, but the url contains - // a storyboard that is only 795 pixels wide (5*160 > 795). You will need to handle this - // "manually" to avoid errors. - // For further reference see: https://github.com/TeamNewPipe/NewPipe/pull/11596 + + /** + * {@inheritDoc} + * Should return a list of Frameset object that contains preview of stream frames + * + *

Warning: When using this method be aware + * that the YouTube API very rarely returns framesets, + * that are slightly too small e.g. framesPerPageX = 5, frameWidth = 160, but the url contains + * a storyboard that is only 795 pixels wide (5*160 > 795). You will need to handle this + * "manually" to avoid errors.

+ * + * @see + * TeamNewPipe/NewPipe#11596 + */ @Nonnull @Override public List getFrames() throws ExtractionException {