From ea7e6526fd27de8de39dcef02c12208edd01183d Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 4 Aug 2021 18:09:42 +0530 Subject: [PATCH] Collect replies/page to CommentsInfoItem. --- .../newpipe/extractor/comments/CommentsInfoItem.java | 7 +++++++ .../extractor/comments/CommentsInfoItemsCollector.java | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItem.java b/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItem.java index 822069b39..5ed6d6888 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItem.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItem.java @@ -1,6 +1,7 @@ package org.schabi.newpipe.extractor.comments; import org.schabi.newpipe.extractor.InfoItem; +import org.schabi.newpipe.extractor.Page; import org.schabi.newpipe.extractor.localization.DateWrapper; import javax.annotation.Nullable; @@ -21,6 +22,8 @@ public class CommentsInfoItem extends InfoItem { private boolean heartedByUploader; private boolean pinned; private int streamPosition; + @Nullable + private Page replies; public static final int NO_LIKE_COUNT = -1; public static final int NO_STREAM_POSITION = -1; @@ -142,4 +145,8 @@ public class CommentsInfoItem extends InfoItem { public int getStreamPosition() { return streamPosition; } + + public void setReplies(@Nullable Page replies) { this.replies = replies; } + + public Page getReplies() { return this.replies; } } diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItemsCollector.java b/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItemsCollector.java index 3dc2d95f1..cd80a9b01 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItemsCollector.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfoItemsCollector.java @@ -93,6 +93,12 @@ public class CommentsInfoItemsCollector extends InfoItemsCollector