From 57276a823c7b7f6d4950f606f5f22850dca36f58 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Wed, 25 Oct 2023 14:08:32 +0200 Subject: [PATCH 1/2] feat(comments): add isChannelOwner field --- .../java/me/kavin/piped/server/handlers/StreamHandlers.java | 4 ++-- src/main/java/me/kavin/piped/utils/obj/Comment.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/kavin/piped/server/handlers/StreamHandlers.java b/src/main/java/me/kavin/piped/server/handlers/StreamHandlers.java index 9dd6c6e..4354265 100644 --- a/src/main/java/me/kavin/piped/server/handlers/StreamHandlers.java +++ b/src/main/java/me/kavin/piped/server/handlers/StreamHandlers.java @@ -344,7 +344,7 @@ public class StreamHandlers { comments.add(new Comment(comment.getUploaderName(), getLastThumbnail(comment.getUploaderAvatars()), comment.getCommentId(), Optional.ofNullable(comment.getCommentText()).map(Description::getContent).orElse(null), comment.getTextualUploadDate(), substringYouTube(comment.getUploaderUrl()), repliespage, comment.getLikeCount(), comment.getReplyCount(), - comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply())); + comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply(), comment.isChannelOwner())); } catch (JsonProcessingException e) { ExceptionHandler.handle(e); } @@ -382,7 +382,7 @@ public class StreamHandlers { comments.add(new Comment(comment.getUploaderName(), getLastThumbnail(comment.getUploaderAvatars()), comment.getCommentId(), Optional.ofNullable(comment.getCommentText()).map(Description::getContent).orElse(null), comment.getTextualUploadDate(), substringYouTube(comment.getUploaderUrl()), repliespage, comment.getLikeCount(), comment.getReplyCount(), - comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply())); + comment.isHeartedByUploader(), comment.isPinned(), comment.isUploaderVerified(), comment.hasCreatorReply(), comment.isChannelOwner())); } catch (JsonProcessingException e) { ExceptionHandler.handle(e); } diff --git a/src/main/java/me/kavin/piped/utils/obj/Comment.java b/src/main/java/me/kavin/piped/utils/obj/Comment.java index 53bdda2..d6f42aa 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Comment.java +++ b/src/main/java/me/kavin/piped/utils/obj/Comment.java @@ -4,10 +4,10 @@ public class Comment { public String author, thumbnail, commentId, commentText, commentedTime, commentorUrl, repliesPage; public int likeCount, replyCount; - public boolean hearted, pinned, verified, creatorReplied; + public boolean hearted, pinned, verified, creatorReplied, channelOwner; public Comment(String author, String thumbnail, String commentId, String commentText, String commentedTime, - String commentorUrl, String repliesPage, int likeCount, int replyCount, boolean hearted, boolean pinned, boolean verified, boolean creatorReplied) { + String commentorUrl, String repliesPage, int likeCount, int replyCount, boolean hearted, boolean pinned, boolean verified, boolean creatorReplied, boolean channelOwner) { this.author = author; this.thumbnail = thumbnail; this.commentId = commentId; @@ -21,5 +21,6 @@ public class Comment { this.pinned = pinned; this.verified = verified; this.creatorReplied = creatorReplied; + this.channelOwner = channelOwner; } } From fb13256c96a0948ea9681840e63a5f7ae5884e49 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:32:20 +0100 Subject: [PATCH 2/2] Bump extractor version. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b87f662..5a58433 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ dependencies { implementation 'it.unimi.dsi:fastutil-core:8.5.12' implementation 'commons-codec:commons-codec:1.16.0' implementation 'org.bouncycastle:bcprov-jdk15on:1.70' - implementation 'com.github.FireMasterK.NewPipeExtractor:NewPipeExtractor:48beff184a9792c4787cfa05fce577c3adf89f56' + implementation 'com.github.FireMasterK.NewPipeExtractor:NewPipeExtractor:8cf9a4aef0919df2ef1baafd30ab5bfefefc0844' implementation 'com.github.FireMasterK:nanojson:9f4af3b739cc13f3d0d9d4b758bbe2b2ae7119d7' implementation 'com.fasterxml.jackson.core:jackson-core:2.15.2' implementation 'com.fasterxml.jackson.core:jackson-annotations:2.15.2'