]> code.octet-stream.net Git - broadcaster/commitdiff
Fix lints
authorThomas Karpiniec <tom.karpiniec@outlook.com>
Wed, 28 May 2025 11:26:05 +0000 (21:26 +1000)
committerThomas Karpiniec <tom.karpiniec@outlook.com>
Wed, 28 May 2025 11:26:05 +0000 (21:26 +1000)
radio/config.go
radio/main.go

index 331f9f56a22b8b19c616b1873304ff19e6bd908b..a91787ee4946639b2ae33de9d98bdba3cfd9c35b 100644 (file)
@@ -48,7 +48,7 @@ func (c *RadioConfig) Validate() error {
                return errors.New("ServerURL must be provided in the configuration")
        }
        if c.Token == "" {
                return errors.New("ServerURL must be provided in the configuration")
        }
        if c.Token == "" {
-               return errors.New("Token must be provided in the configuration")
+               return errors.New("token must be provided in the configuration")
        }
        return nil
 }
        }
        return nil
 }
index ca7c99633d8fa6d4595a6d403d4d8f336e15580e..1f95d76e6bdd0c13816959501cfc48b73b3780e8 100644 (file)
@@ -242,7 +242,7 @@ func playlistWorker(ch <-chan []protocol.PlaylistSpec, stop <-chan bool) {
                                }
                        }
                        if found {
                                }
                        }
                        if found {
-                               duration := soonestTime.Sub(time.Now())
+                               duration := time.Until(soonestTime)
                                log.Println("Next playlist will be id", nextId, "in", duration.Seconds(), "seconds")
                                timer = time.NewTimer(duration)
                        } else {
                                log.Println("Next playlist will be id", nextId, "in", duration.Seconds(), "seconds")
                                timer = time.NewTimer(duration)
                        } else {