]> code.octet-stream.net Git - broadcaster/blobdiff - radio/main.go
Update version tag to v1.1.0
[broadcaster] / radio / main.go
index ca7c99633d8fa6d4595a6d403d4d8f336e15580e..22658a38633fab0219c54e1fee37a80c4e44e95f 100644 (file)
@@ -20,7 +20,7 @@ import (
        "golang.org/x/net/websocket"
 )
 
-const version = "v1.0.0"
+const version = "v1.1.0"
 const sampleRate = 44100
 
 var config RadioConfig = NewRadioConfig()
@@ -242,7 +242,7 @@ func playlistWorker(ch <-chan []protocol.PlaylistSpec, stop <-chan bool) {
                                }
                        }
                        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 {