mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
feat: add uploaded timestamp to streams response
This commit is contained in:
parent
d67e50b5b8
commit
49a9cd07fd
2 changed files with 7 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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<PipedStream> audioStreams, videoStreams;
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class Streams {
|
|||
|
||||
public List<PreviewFrames> 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<PipedStream> audioStreams, List<PipedStream> videoStreams,
|
||||
List<ContentItem> relatedStreams, List<Subtitle> 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;
|
||||
|
|
Loading…
Reference in a new issue