We are closer for working IcecastLastPlayedSongs().
This commit is contained in:
parent
c4ea8aef8c
commit
6a61c56891
@ -3,7 +3,6 @@ package radio
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@ -79,7 +78,9 @@ func IcecastLastPlayedSongs(lastNSongs int, playlistPath string) []Song {
|
||||
|
||||
for _, song := range songs_ {
|
||||
ts := strings.Split(song, "|")
|
||||
log.Println(len(ts), ts)
|
||||
if len(ts) <= 1 {
|
||||
continue
|
||||
}
|
||||
tim, _ := time.Parse("02/01/2006:15:04:05 -0700", ts[0])
|
||||
at := strings.Split(ts[1], " - ")
|
||||
songs = append(songs, Song{
|
||||
|
Loading…
Reference in New Issue
Block a user