diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index 3b81b22..317bc4d 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -18,7 +18,7 @@ const ( IcecastPlaylistDateFormat = "02/Jan/2006:15:04:05 -0700" SongTimeFormat = "2006 15:04-0700" - bufferSize = 3072 + bufferSizePerLine = 320 ) var ( @@ -103,6 +103,7 @@ func IcecastLastSong(playlistPath string) (*Song, error) { func icecastLastPlayedSongs(playlistPath string, n int) ([]Song, error) { var buf []byte var offset int64 = 0 + var bufferSize int64 = int64(n) * bufferSizePerLine playlist, err := os.Open(playlistPath) if err != nil {