From 6860543b07991dfb424a506bb6bb60b0c78145e7 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Wed, 16 Jun 2021 20:14:07 +0200
Subject: [PATCH] Added more doc
---
.../youtube/extractors/YoutubeCommentsExtractor.java | 9 +++++++++
1 file changed, 9 insertions(+)
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 442c90c2..959397c4 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(