diff --git a/src/main/java/me/kavin/piped/utils/CollectionUtils.java b/src/main/java/me/kavin/piped/utils/CollectionUtils.java index ded6c24..97726c8 100644 --- a/src/main/java/me/kavin/piped/utils/CollectionUtils.java +++ b/src/main/java/me/kavin/piped/utils/CollectionUtils.java @@ -76,9 +76,10 @@ public class CollectionUtils { ))); return new Streams(info.getName(), info.getDescription().getContent(), - info.getTextualUploadDate(), info.getUploaderName(), substringYouTube(info.getUploaderUrl()), - getLastThumbnail(info.getUploaderAvatars()), getLastThumbnail(info.getThumbnails()), info.getDuration(), - info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), info.getUploaderSubscriberCount(), info.isUploaderVerified(), + info.getTextualUploadDate(), info.getUploadDate() != null ? info.getUploadDate().offsetDateTime().toInstant().toEpochMilli() : -1, + info.getUploaderName(), substringYouTube(info.getUploaderUrl()), getLastThumbnail(info.getUploaderAvatars()), + getLastThumbnail(info.getThumbnails()), info.getDuration(), info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), + info.getUploaderSubscriberCount(), info.isUploaderVerified(), audioStreams, videoStreams, relatedStreams, subtitles, livestream, rewriteVideoURL(info.getHlsUrl(), Map.of()), rewriteVideoURL(info.getDashMpdUrl(), Map.of()), null, info.getCategory(), info.getLicence(), info.getPrivacy().name().toLowerCase(), info.getTags(), metaInfo, chapters, previewFrames); 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 478a37b..e0c2dd6 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Streams.java +++ b/src/main/java/me/kavin/piped/utils/obj/Streams.java @@ -17,7 +17,7 @@ public class Streams { public boolean uploaderVerified; - public long duration, views, likes, dislikes, uploaderSubscriberCount; + public long duration, views, likes, dislikes, uploaderSubscriberCount, uploaded; public List audioStreams, videoStreams; @@ -33,7 +33,7 @@ public class Streams { public List previewFrames; - public Streams(String title, String description, String uploadDate, String uploader, String uploaderUrl, + public Streams(String title, String description, String uploadDate, long uploaded, String uploader, String uploaderUrl, 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, @@ -42,6 +42,7 @@ public class Streams { this.title = title; this.description = description; this.uploadDate = uploadDate; + this.uploaded = uploaded; this.uploader = uploader; this.uploaderUrl = uploaderUrl; this.uploaderAvatar = uploaderAvatar;