mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 02:20:18 +00:00
Fix typo & memory leak in Streamer class
This commit is contained in:
parent
51a038096a
commit
12db2c5fcc
@ -40,7 +40,7 @@ module.exports = class {
|
||||
|
||||
let streamers = this.map.keys();
|
||||
streamers.forEach(streamer => {
|
||||
if(client.stations.findIndex(station => station.name == streamer)) return;
|
||||
if(client.stations.findIndex(station => station.name == streamer) == -1) return;
|
||||
this.stop(streamer);
|
||||
});
|
||||
}
|
||||
@ -73,15 +73,12 @@ module.exports = class {
|
||||
this.play(station);
|
||||
});
|
||||
|
||||
|
||||
|
||||
audioPlayer
|
||||
.on('playing', () => {
|
||||
this.logger('Streamer', station.name + " / " + "Playing");
|
||||
})
|
||||
.on('idle', () => {
|
||||
this.logger('Streamer', station.name + " / " + "Idle");
|
||||
this.play(station);
|
||||
})
|
||||
.on('paused', () => {
|
||||
this.logger('Streamer', station.name + " / " + "Paused");
|
||||
|
Loading…
Reference in New Issue
Block a user