Added random and individual queuing from playlists.
This commit is contained in:
parent
e61d9deb52
commit
e629c63b2c
6 changed files with 244 additions and 57 deletions
|
|
@ -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 = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue