Fix issue in Streamer class

This commit is contained in:
Christer Warén 2023-11-21 07:02:32 +02:00
parent c35a0801fd
commit 2d3c7e1184

View File

@ -70,9 +70,13 @@ export default class Streamer {
}) })
.on(AudioPlayerStatus.Idle, () => { .on(AudioPlayerStatus.Idle, () => {
logger('Streamer', station.name + " / " + "Idle"); logger('Streamer', station.name + " / " + "Idle");
if(this.mode == "auto"){
const url = station.stream[station.stream.default]; const url = station.stream[station.stream.default];
const resource = createAudioResource(url); const resource = createAudioResource(url);
audioPlayer?.play(resource); audioPlayer?.play(resource);
} else {
this.stop(station.name);
}
}) })
.on(AudioPlayerStatus.Paused, () => { .on(AudioPlayerStatus.Paused, () => {
logger('Streamer', station.name + " / " + "Paused"); logger('Streamer', station.name + " / " + "Paused");