diff --git a/internal/http/dj_handlers.go b/internal/http/dj_handlers.go index 42976f3..d1a45a4 100644 --- a/internal/http/dj_handlers.go +++ b/internal/http/dj_handlers.go @@ -83,7 +83,10 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) { Title: oggf.GetTag("title"), Duration: oggf.GetDuration(), MaxListeners: dj.listeners.Current(), - StartAt: time.Now()} + // Here 5 seconds are being added because it is approximately the + // time between the creation of this Song object and when ezstream + // actually starts to play it. + StartAt: time.Now().Add(5 * time.Second)} if strings.HasSuffix(nxt, "/fallback.ogg") { song.Artist = "Nothing to play. Playing a fallback: " + song.Artist