diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java index 442c90c20..959397c4f 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java @@ -43,6 +43,15 @@ public class YoutubeCommentsExtractor extends CommentsExtractor { private String ytClientName; private String responseBody; + /** + * Caching mechanism and holder of the commentsDisabled value. + *
+ * Initial value = empty -> unknown if comments are disabled or not
+ * Some method calls {@link YoutubeCommentsExtractor#findInitialCommentsToken()} + * -> value is set
+ * If the method or another one that is depending on disabled comments + * is now called again, the method execution can avoid unnecessary calls + */ private Optional optCommentsDisabled = Optional.empty(); public YoutubeCommentsExtractor(