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; }