Added random and individual queuing from playlists.

This commit is contained in:
rainbow napkin 2025-04-05 15:53:07 -04:00
parent e61d9deb52
commit e629c63b2c
6 changed files with 244 additions and 57 deletions

View file

@ -606,31 +606,6 @@ 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);
//Set media status schema discriminator
media.status = 'saved';
//Add the media to the playlist
this.media.playlists[playlist.listIndex].media.push(media);
//Save the changes made to the chan doc
await this.save();
}
channelSchema.methods.getChanBans = async function(){
//Create an empty list to hold our found bans
var banList = [];