mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 06:33: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();
|
let streamers = this.map.keys();
|
||||||
streamers.forEach(streamer => {
|
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);
|
this.stop(streamer);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -73,15 +73,12 @@ module.exports = class {
|
|||||||
this.play(station);
|
this.play(station);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
audioPlayer
|
audioPlayer
|
||||||
.on('playing', () => {
|
.on('playing', () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Playing");
|
this.logger('Streamer', station.name + " / " + "Playing");
|
||||||
})
|
})
|
||||||
.on('idle', () => {
|
.on('idle', () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Idle");
|
this.logger('Streamer', station.name + " / " + "Idle");
|
||||||
this.play(station);
|
|
||||||
})
|
})
|
||||||
.on('paused', () => {
|
.on('paused', () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Paused");
|
this.logger('Streamer', station.name + " / " + "Paused");
|
||||||
|
Loading…
Reference in New Issue
Block a user