From 2a0b47f7cdc10ae4624cce58a0d7d7600632f2c0 Mon Sep 17 00:00:00 2001 From: abs3nt Date: Tue, 10 Jan 2023 13:16:38 -0800 Subject: [PATCH] refillradio --- internal/commands/commands.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 160688b..ec077f4 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -238,8 +238,16 @@ func RefillRadio(ctx *gctx.Context, client *spotify.Client) error { if err != nil { return err } + if !status.Playing { + fmt.Println("Nothing is playing") + return nil + } to_remove := []spotify.ID{} radioPlaylist, err := GetRadioPlaylist(ctx, client) + if status.PlaybackContext.URI != radioPlaylist.URI { + fmt.Println("You are not playing the radio, please run gospt radio to start") + return nil + } found := false page := 0 for !found {