From 419f5639bf7e2769bc742e78e395c72c1d791c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Tue, 26 Oct 2021 02:35:18 +0300 Subject: [PATCH] Update Streamer class --- src/client/classes/Streamer.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/classes/Streamer.js b/src/client/classes/Streamer.js index acfb09c..f70ab00 100644 --- a/src/client/classes/Streamer.js +++ b/src/client/classes/Streamer.js @@ -63,15 +63,12 @@ module.exports = class { resource.playStream .on("readable", () => { this.logger('Streamer', station.name + " / " + "Readable"); - this.map.set(station.name, audioPlayer); }) .on("finish", () => { this.logger('Streamer', station.name + " / " + "Finished"); - this.play(station); }) .on("error", error => { - this.logger('Streamer', station.name + " / " + "Error"); - this.play(station); + this.logger('Streamer', station.name + " / " + "Error" + "\n" + error); }); audioPlayer @@ -80,6 +77,7 @@ module.exports = class { }) .on('idle', () => { this.logger('Streamer', station.name + " / " + "Idle"); + this.play(station); }) .on('paused', () => { this.logger('Streamer', station.name + " / " + "Paused");