From a0c5898f4d9b31974c525aedc5e43fe6efb49648 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 12 Aug 2021 22:57:16 +0530 Subject: [PATCH] Fix CommentorURL NPE and wrong substring. --- src/main/java/me/kavin/piped/utils/ResponseHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/kavin/piped/utils/ResponseHelper.java b/src/main/java/me/kavin/piped/utils/ResponseHelper.java index c92e33b..845a3ad 100644 --- a/src/main/java/me/kavin/piped/utils/ResponseHelper.java +++ b/src/main/java/me/kavin/piped/utils/ResponseHelper.java @@ -487,7 +487,7 @@ public class ResponseHelper { info.getRelatedItems().forEach(comment -> { comments.add(new Comment(comment.getUploaderName(), rewriteURL(comment.getUploaderAvatarUrl()), comment.getCommentId(), comment.getCommentText(), comment.getTextualUploadDate(), - optionalSubstring(comment.getUploaderUrl(), 19), comment.getLikeCount(), + optionalSubstring(comment.getUploaderUrl(), 23), comment.getLikeCount(), comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified())); }); @@ -516,8 +516,8 @@ public class ResponseHelper { info.getItems().forEach(comment -> { comments.add(new Comment(comment.getUploaderName(), rewriteURL(comment.getUploaderAvatarUrl()), comment.getCommentId(), comment.getCommentText(), comment.getTextualUploadDate(), - comment.getUploaderUrl().substring(19), comment.getLikeCount(), comment.isHeartedByUploader(), - comment.isPinned(), comment.isUploaderVerified())); + optionalSubstring(comment.getUploaderUrl(), 23), comment.getLikeCount(), + comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified())); }); String nextpage = null;