From 8d0012cb8acab0e31b7df0e993305e85396e41a1 Mon Sep 17 00:00:00 2001 From: Alin Date: Thu, 16 Feb 2023 16:12:29 +0000 Subject: [PATCH 1/2] add category --- src/main/java/me/kavin/piped/utils/CollectionUtils.java | 2 +- src/main/java/me/kavin/piped/utils/obj/Streams.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/kavin/piped/utils/CollectionUtils.java b/src/main/java/me/kavin/piped/utils/CollectionUtils.java index 1b47d42..b47abc1 100644 --- a/src/main/java/me/kavin/piped/utils/CollectionUtils.java +++ b/src/main/java/me/kavin/piped/utils/CollectionUtils.java @@ -62,7 +62,7 @@ public class CollectionUtils { rewriteURL(info.getUploaderAvatarUrl()), rewriteURL(info.getThumbnailUrl()), info.getDuration(), info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), info.getUploaderSubscriberCount(), info.isUploaderVerified(), audioStreams, videoStreams, relatedStreams, subtitles, livestream, rewriteVideoURL(info.getHlsUrl()), - rewriteVideoURL(info.getDashMpdUrl()), null, chapters, previewFrames); + rewriteVideoURL(info.getDashMpdUrl()), null, chapters, previewFrames, info.getCategory()); } public static List collectRelatedItems(List items) { diff --git a/src/main/java/me/kavin/piped/utils/obj/Streams.java b/src/main/java/me/kavin/piped/utils/obj/Streams.java index 10863d7..ac7a26f 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Streams.java +++ b/src/main/java/me/kavin/piped/utils/obj/Streams.java @@ -9,7 +9,7 @@ import java.util.List; public class Streams { public String title, description, uploadDate, uploader, uploaderUrl, uploaderAvatar, thumbnailUrl, hls, dash, - lbryId; + lbryId, category; public boolean uploaderVerified; @@ -33,7 +33,7 @@ public class Streams { String uploaderAvatar, String thumbnailUrl, long duration, long views, long likes, long dislikes, long uploaderSubscriberCount, boolean uploaderVerified, List audioStreams, List videoStreams, List relatedStreams, List subtitles, boolean livestream, String hls, String dash, - String lbryId, List chapters, List previewFrames) { + String lbryId, List chapters, List previewFrames, String category) { this.title = title; this.description = description; this.uploadDate = uploadDate; @@ -57,5 +57,6 @@ public class Streams { this.lbryId = lbryId; this.chapters = chapters; this.previewFrames = previewFrames; + this.category = category; } } From 618b59d1afdbcfbb53565bbf2fc6df8f2a7d053c Mon Sep 17 00:00:00 2001 From: Alin Date: Thu, 16 Feb 2023 17:36:41 +0000 Subject: [PATCH 2/2] change order --- src/main/java/me/kavin/piped/utils/CollectionUtils.java | 2 +- src/main/java/me/kavin/piped/utils/obj/Streams.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/kavin/piped/utils/CollectionUtils.java b/src/main/java/me/kavin/piped/utils/CollectionUtils.java index b47abc1..97f6791 100644 --- a/src/main/java/me/kavin/piped/utils/CollectionUtils.java +++ b/src/main/java/me/kavin/piped/utils/CollectionUtils.java @@ -62,7 +62,7 @@ public class CollectionUtils { rewriteURL(info.getUploaderAvatarUrl()), rewriteURL(info.getThumbnailUrl()), info.getDuration(), info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), info.getUploaderSubscriberCount(), info.isUploaderVerified(), audioStreams, videoStreams, relatedStreams, subtitles, livestream, rewriteVideoURL(info.getHlsUrl()), - rewriteVideoURL(info.getDashMpdUrl()), null, chapters, previewFrames, info.getCategory()); + rewriteVideoURL(info.getDashMpdUrl()), null, info.getCategory(), chapters, previewFrames); } public static List collectRelatedItems(List items) { diff --git a/src/main/java/me/kavin/piped/utils/obj/Streams.java b/src/main/java/me/kavin/piped/utils/obj/Streams.java index ac7a26f..2567e89 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Streams.java +++ b/src/main/java/me/kavin/piped/utils/obj/Streams.java @@ -33,7 +33,7 @@ public class Streams { String uploaderAvatar, String thumbnailUrl, long duration, long views, long likes, long dislikes, long uploaderSubscriberCount, boolean uploaderVerified, List audioStreams, List videoStreams, List relatedStreams, List subtitles, boolean livestream, String hls, String dash, - String lbryId, List chapters, List previewFrames, String category) { + String lbryId, String category, List chapters, List previewFrames) { this.title = title; this.description = description; this.uploadDate = uploadDate;