From 6a0341d59c78932a7427ebfc29fc556852015e00 Mon Sep 17 00:00:00 2001 From: Ritvik Saraf <13ritvik@gmail.com> Date: Sat, 22 Sep 2018 14:55:59 +0530 Subject: [PATCH] testing --- .../schabi/newpipe/extractor/comments/CommentsInfo.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfo.java b/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfo.java index fb0cc14b9..59a0e1995 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfo.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/comments/CommentsInfo.java @@ -43,6 +43,10 @@ public class CommentsInfo extends ListInfo{ commentsExtractor); commentsInfo.setComments(new ArrayList<>()); commentsInfo.getComments().addAll(initialCommentsPage.getItems()); + //tmp + commentsInfo.setRelatedItems(initialCommentsPage.getItems()); + commentsInfo.setNextCommentsPageUrl(initialCommentsPage.getNextPageUrl()); + commentsInfo.setHasMoreComments(initialCommentsPage.hasNextPage()); commentsInfo.setNextCommentsPageUrl(initialCommentsPage.getNextPageUrl()); return commentsInfo; @@ -53,7 +57,8 @@ public class CommentsInfo extends ListInfo{ if(null == commentsInfo.getCommentsExtractor()) { try { commentsInfo.setCommentsExtractor(NewPipe.getService(commentsInfo.getServiceId()).getCommentsExtractor(commentsInfo.getUrl())); - } catch (ExtractionException e) { + commentsInfo.getCommentsExtractor().fetchPage(); + } catch (ExtractionException | IOException e) { commentsInfo.addError(e); return; }