1
0

IcecastLastSongs() (formerly known as IcecastLastPlayedSongs()) args were changed, so let's delete unneeded arg.

This commit is contained in:
Alexander Andreev 2023-03-12 21:32:29 +04:00
parent 517dd0e534
commit 6d4a276dd8
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -40,8 +40,7 @@ func (h *Handlers) Index(w http.ResponseWriter, r *http.Request) {
} }
} }
songs, err := radio.IcecastLastPlayedSongs(h.conf.ListLastNSongs, songs, err := radio.IcecastLastSongs(h.conf.Icecast.Playlist)
h.conf.Icecast.Playlist)
if err != nil { if err != nil {
log.Println("cannot retrieve last songs:", err) log.Println("cannot retrieve last songs:", err)
} else { } else {
@ -81,7 +80,7 @@ func (h *Handlers) LastSong(w http.ResponseWriter, r *http.Request) {
log.Println("cannot retrieve last songs:", err) log.Println("cannot retrieve last songs:", err)
} }
if song.Time == "" { if song == nil {
w.WriteHeader(http.StatusNotFound) w.WriteHeader(http.StatusNotFound)
return return
} }