mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 09:53:18 +00:00
Update Streamer class
This commit is contained in:
parent
b6b96fb7a6
commit
419f5639bf
@ -63,15 +63,12 @@ module.exports = class {
|
|||||||
resource.playStream
|
resource.playStream
|
||||||
.on("readable", () => {
|
.on("readable", () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Readable");
|
this.logger('Streamer', station.name + " / " + "Readable");
|
||||||
this.map.set(station.name, audioPlayer);
|
|
||||||
})
|
})
|
||||||
.on("finish", () => {
|
.on("finish", () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Finished");
|
this.logger('Streamer', station.name + " / " + "Finished");
|
||||||
this.play(station);
|
|
||||||
})
|
})
|
||||||
.on("error", error => {
|
.on("error", error => {
|
||||||
this.logger('Streamer', station.name + " / " + "Error");
|
this.logger('Streamer', station.name + " / " + "Error" + "\n" + error);
|
||||||
this.play(station);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
audioPlayer
|
audioPlayer
|
||||||
@ -80,6 +77,7 @@ module.exports = class {
|
|||||||
})
|
})
|
||||||
.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