From ffa9c8abb0718dd583f077cb871b9ef05ffaec31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sat, 11 Sep 2021 23:12:39 +0300 Subject: [PATCH] Update Streamer class --- src/client/classes/Streamer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/classes/Streamer.js b/src/client/classes/Streamer.js index b807d39..8622264 100644 --- a/src/client/classes/Streamer.js +++ b/src/client/classes/Streamer.js @@ -25,6 +25,12 @@ module.exports = class { refresh(client){ this.init(client); + + let streamers = this.map.keys(); + streamers.forEach(streamer => { + if(client.stations.findIndex(station => station.name == streamer)) return; + this.map.delete(streamer); + }); } play(station) {