From 83843de4ee5281bd8a39b0e17ca08d0f20288c57 Mon Sep 17 00:00:00 2001 From: "Felipe M." Date: Wed, 7 May 2025 10:21:54 +0200 Subject: [PATCH] removed backup --- main.go | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/main.go b/main.go index 8b85b09..71a6ade 100644 --- a/main.go +++ b/main.go @@ -18,12 +18,11 @@ import ( ) var ( - token string - radioURL = "https://atres-live.europafm.com/live/europafm/bitrate_1.m3u8" - backupRadioURL = "https://playerservices.streamtheworld.com/api/livestream-redirect/EUROPA_FM.mp3" - logger *slog.Logger - debug bool - guildID string // For testing in a specific guild + token string + radioURL = "https://atres-live.europafm.com/live/europafm/bitrate_1.m3u8" + logger *slog.Logger + debug bool + guildID string // For testing in a specific guild ) func init() { @@ -479,14 +478,5 @@ func playAudioStream(vc *discordgo.VoiceConnection, url string, stopChan chan bo // If we get here, the stream ended unexpectedly logger.Warn("Audio stream ended unexpectedly") - // If primary URL fails and it's not the backup URL, try the backup URL - if url == radioURL && backupRadioURL != "" { - logger.Info("Primary URL failed, trying backup URL", "backup_url", backupRadioURL) - dgvoice.PlayAudioFile(vc, backupRadioURL, stopChan) - - // If we get here, the backup stream also ended unexpectedly - logger.Warn("Backup audio stream also ended unexpectedly") - } - return fmt.Errorf("audio stream ended unexpectedly") }