From ec3b69b7a70b0f035b57287ef53e14a0c308d8f8 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Tue, 8 Feb 2022 14:43:45 +0000 Subject: [PATCH] Add shortDescription parameter to StreamItem. (#184) --- src/main/java/me/kavin/piped/utils/ResponseHelper.java | 2 +- src/main/java/me/kavin/piped/utils/obj/StreamItem.java | 5 +++-- 2 files changed, 4 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 bf8cfc0..3866ad5 100644 --- a/src/main/java/me/kavin/piped/utils/ResponseHelper.java +++ b/src/main/java/me/kavin/piped/utils/ResponseHelper.java @@ -1045,7 +1045,7 @@ public class ResponseHelper { return new StreamItem(substringYouTube(item.getUrl()), item.getName(), rewriteURL(item.getThumbnailUrl()), item.getUploaderName(), substringYouTube(item.getUploaderUrl()), - rewriteURL(item.getUploaderAvatarUrl()), item.getTextualUploadDate(), item.getDuration(), + rewriteURL(item.getUploaderAvatarUrl()), item.getTextualUploadDate(), item.getShortDescription(), item.getDuration(), item.getViewCount(), item.getUploadDate() != null ? item.getUploadDate().offsetDateTime().toInstant().toEpochMilli() : -1, item.isUploaderVerified()); } } diff --git a/src/main/java/me/kavin/piped/utils/obj/StreamItem.java b/src/main/java/me/kavin/piped/utils/obj/StreamItem.java index bf76e4e..8844799 100644 --- a/src/main/java/me/kavin/piped/utils/obj/StreamItem.java +++ b/src/main/java/me/kavin/piped/utils/obj/StreamItem.java @@ -2,12 +2,12 @@ package me.kavin.piped.utils.obj; public class StreamItem { - public String url, title, thumbnail, uploaderName, uploaderUrl, uploaderAvatar, uploadedDate; + public String url, title, thumbnail, uploaderName, uploaderUrl, uploaderAvatar, uploadedDate, shortDescription; public long duration, views, uploaded; public boolean uploaderVerified; public StreamItem(String url, String title, String thumbnail, String uploaderName, String uploaderUrl, - String uploaderAvatar, String uploadedDate, long duration, long views, long uploaded, boolean uploaderVerified) { + String uploaderAvatar, String uploadedDate, String shortDescription, long duration, long views, long uploaded, boolean uploaderVerified) { this.url = url; this.title = title; this.thumbnail = thumbnail; @@ -15,6 +15,7 @@ public class StreamItem { this.uploaderUrl = uploaderUrl; this.uploaderAvatar = uploaderAvatar; this.uploadedDate = uploadedDate; + this.shortDescription = shortDescription; this.duration = duration; this.views = views; this.uploaded = uploaded;