Started work on channel-wide playlists.
This commit is contained in:
parent
59f097db39
commit
72a89ae5ff
5 changed files with 161 additions and 5 deletions
|
|
@ -17,9 +17,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
//local imports
|
||||
const connectedUser = require('./connectedUser');
|
||||
const queue = require('./media/queue');
|
||||
const flairModel = require('../../schemas/flairSchema');
|
||||
const permissionModel = require('../../schemas/permissionSchema');
|
||||
const channelModel = require('../../schemas/channel/channelSchema');
|
||||
const playlistHandler = require('./media/playlistHandler')
|
||||
|
||||
module.exports = class{
|
||||
constructor(server, chanDB){
|
||||
|
|
@ -29,6 +28,7 @@ module.exports = class{
|
|||
//Keeping these in a map was originally a vestige but it's more preformant than an array or object so :P
|
||||
this.userList = new Map();
|
||||
this.queue = new queue(server, chanDB, this);
|
||||
this.playlistHandler = new playlistHandler(server, chanDB, this);
|
||||
}
|
||||
|
||||
async handleConnection(userDB, chanDB, socket){
|
||||
|
|
@ -57,6 +57,7 @@ module.exports = class{
|
|||
|
||||
//Define per-channel event listeners
|
||||
this.queue.defineListeners(socket);
|
||||
this.playlistHandler.defineListeners(socket);
|
||||
|
||||
//Hand off the connection initiation to it's user object
|
||||
await userObj.handleConnection(userDB, chanDB, socket)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue