Finished up with Playlist Managment UI.

This commit is contained in:
rainbow napkin 2025-04-04 08:18:20 -04:00
parent c8c59feb7f
commit f21b66fae0
7 changed files with 180 additions and 42 deletions

View file

@ -606,6 +606,17 @@ channelSchema.methods.deletePlaylistByName = async function(name){
await this.save();
}
channelSchema.methods.deletePlaylistMediaByUUID = async function(name, uuid){
//Find the playlist
let playlist = this.getPlaylistByName(name);
//splice out the given playlist
this.media.playlists[playlist.listIndex].deleteMedia(uuid);
//save the channel document
await this.save();
}
channelSchema.methods.addToPlaylist = async function(name, media){
//Find the playlist
let playlist = this.getPlaylistByName(name);