mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2025-04-29 08:20:30 +05:30
Implement support for extracting playlist description.
This commit is contained in:
parent
0769fb6358
commit
f6639511aa
@ -61,7 +61,7 @@ public class PlaylistHandlers {
|
||||
}
|
||||
|
||||
final Playlist playlist = new Playlist(info.getName(), rewriteURL(info.getThumbnailUrl()),
|
||||
rewriteURL(info.getBannerUrl()), nextpage,
|
||||
info.getDescription().getContent(), rewriteURL(info.getBannerUrl()), nextpage,
|
||||
info.getUploaderName().isEmpty() ? null : info.getUploaderName(),
|
||||
substringYouTube(info.getUploaderUrl()), rewriteURL(info.getUploaderAvatarUrl()),
|
||||
(int) info.getStreamCount(), relatedStreams);
|
||||
|
@ -67,7 +67,7 @@ public class AuthPlaylistHandlers {
|
||||
video.getDuration(), -1, -1, channel.isVerified(), false));
|
||||
}
|
||||
|
||||
final Playlist playlist = new Playlist(pl.getName(), rewriteURL(pl.getThumbnail()), null, null, pl.getOwner().getUsername(),
|
||||
final Playlist playlist = new Playlist(pl.getName(), rewriteURL(pl.getThumbnail()), pl.getShortDescription(), null, null, pl.getOwner().getUsername(),
|
||||
null, null, videos.size(), relatedStreams);
|
||||
|
||||
return mapper.writeValueAsBytes(playlist);
|
||||
|
@ -4,14 +4,15 @@ import java.util.List;
|
||||
|
||||
public class Playlist {
|
||||
|
||||
public String name, thumbnailUrl, bannerUrl, nextpage, uploader, uploaderUrl, uploaderAvatar;
|
||||
public String name, thumbnailUrl, description, bannerUrl, nextpage, uploader, uploaderUrl, uploaderAvatar;
|
||||
public int videos;
|
||||
public List<ContentItem> relatedStreams;
|
||||
|
||||
public Playlist(String name, String thumbnailUrl, String bannerUrl, String nextpage, String uploader,
|
||||
public Playlist(String name, String thumbnailUrl, String description, String bannerUrl, String nextpage, String uploader,
|
||||
String uploaderUrl, String uploaderAvatar, int videos, List<ContentItem> relatedStreams) {
|
||||
this.name = name;
|
||||
this.thumbnailUrl = thumbnailUrl;
|
||||
this.description = description;
|
||||
this.bannerUrl = bannerUrl;
|
||||
this.nextpage = nextpage;
|
||||
this.videos = videos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user