diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index f8a48a2..65c2aaa 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -137,9 +137,7 @@ func lastPlayedSong(playlistPath string) (*Song, error) { newline_end_pos := bytes.LastIndexByte(buf, '\n') - if newline_end_pos == -1 && !bytes.ContainsRune(buf, '|') { - return nil, nil - } else if newline_end_pos == -1 { + if newline_end_pos == -1 { newline_end_pos = len(buf) } @@ -147,10 +145,6 @@ func lastPlayedSong(playlistPath string) (*Song, error) { last_song_line = string(buf[newline_start_pos+1 : newline_end_pos-1]) - if strings.Count(last_song_line, "|") != 3 { - return nil, nil - } - fields := strings.Split(last_song_line, "|") tim, _ := time.Parse(IcecastPlaylistDateFormat, fields[0])