Alter an artist tag to tell that there is nothing left to play, so a fallback song is used to fill a silence.
This commit is contained in:
parent
22a6200ddb
commit
83955866c9
@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -76,6 +77,10 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) {
|
||||
MaxListeners: dj.listeners.Current(),
|
||||
StartAt: time.Now()}
|
||||
|
||||
if strings.HasSuffix(nxt, "/fallback.ogg") {
|
||||
song.Artist = "Nothing to play. Playing a fallback: " + song.Artist
|
||||
}
|
||||
|
||||
if dj.songList.Current() != nil {
|
||||
dj.mostLSong.Update(*dj.songList.Current())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user