Add Dash URL to streams response.

This commit is contained in:
FireMasterK 2021-08-16 01:21:48 +05:30
parent aed1da4aae
commit e4f071b72a
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
2 changed files with 7 additions and 4 deletions

View File

@ -193,7 +193,7 @@ public class ResponseHelper {
info.getTextualUploadDate(), info.getUploaderName(), info.getUploaderUrl().substring(23),
rewriteURL(info.getUploaderAvatarUrl()), rewriteURL(info.getThumbnailUrl()), info.getDuration(),
info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), audioStreams, videoStreams,
relatedStreams, subtitles, livestream, hls, futureLbryId.get());
relatedStreams, subtitles, livestream, hls, info.getDashMpdUrl(), futureLbryId.get());
return Constants.mapper.writeValueAsBytes(streams);
@ -238,7 +238,8 @@ public class ResponseHelper {
}
final Channel channel = new Channel(info.getId(), info.getName(), rewriteURL(info.getAvatarUrl()),
rewriteURL(info.getBannerUrl()), info.getDescription(), nextpage, info.getSubscriberCount(), relatedStreams);
rewriteURL(info.getBannerUrl()), info.getDescription(), nextpage, info.getSubscriberCount(),
relatedStreams);
IPFS.publishData(channel);

View File

@ -6,7 +6,8 @@ import me.kavin.piped.consts.Constants;
public class Streams {
public String title, description, uploadDate, uploader, uploaderUrl, uploaderAvatar, thumbnailUrl, hls, lbryId;
public String title, description, uploadDate, uploader, uploaderUrl, uploaderAvatar, thumbnailUrl, hls, dash,
lbryId;
public long duration, views, likes, dislikes;
@ -23,7 +24,7 @@ public class Streams {
public Streams(String title, String description, String uploadDate, String uploader, String uploaderUrl,
String uploaderAvatar, String thumbnailUrl, long duration, long views, long likes, long dislikes,
List<PipedStream> audioStreams, List<PipedStream> videoStreams, List<StreamItem> relatedStreams,
List<Subtitle> subtitles, boolean livestream, String hls, String lbryId) {
List<Subtitle> subtitles, boolean livestream, String hls, String dash, String lbryId) {
this.title = title;
this.description = description;
this.uploadDate = uploadDate;
@ -41,6 +42,7 @@ public class Streams {
this.subtitles = subtitles;
this.livestream = livestream;
this.hls = hls;
this.dash = dash;
this.lbryId = lbryId;
}
}