1
0

Oops, last line also has a newline. So the last one is empty.

This commit is contained in:
Alexander Andreev 2022-08-30 00:51:21 +04:00
parent ef9af21de1
commit 64eed7ac7e
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -140,7 +140,7 @@ func lastPlayedSong(playlistPath string) (*Song, error) {
return nil, nil return nil, nil
} }
fields := bytes.Split(lines[len(lines)-2], []byte("|")) fields := bytes.Split(lines[len(lines)-3], []byte("|"))
tim, _ := time.Parse(IcecastPlaylistDateFormat, string(fields[0])) tim, _ := time.Parse(IcecastPlaylistDateFormat, string(fields[0]))