Update Streamer class

This commit is contained in:
Christer Warén 2021-09-16 04:51:23 +03:00
parent 7d38170ba6
commit bfba8304e4

View File

@ -27,9 +27,9 @@ module.exports = class {
} }
if(this.mode == "auto"){ if(this.mode == "auto"){
if(!client.stations) return; if(!client.stations.list) return;
client.stations.forEach(station => { client.stations.list.forEach(station => {
this.play(station); this.play(station);
}); });
} }
@ -40,7 +40,7 @@ module.exports = class {
let streamers = this.map.keys(); let streamers = this.map.keys();
streamers.forEach(streamer => { streamers.forEach(streamer => {
if(client.stations.findIndex(station => station.name == streamer)) return; if(client.stations.list.findIndex(station => station.name == streamer)) return;
this.stop(streamer); this.stop(streamer);
}); });
} }
@ -119,9 +119,9 @@ module.exports = class {
} }
leave(client) { leave(client) {
if(!client.stations) return; if(!client.stations.list) return;
client.stations.forEach(station => { client.stations.list.forEach(station => {
this.stop(station); this.stop(station);
}); });
} }