1
0

According to tests it is equal performance wise, so why not make a code shorter.

This commit is contained in:
Alexander Andreev 2022-04-01 23:20:04 +04:00
parent 7d447be786
commit c4532fea24
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -110,9 +110,7 @@ func lastPlayedSongs(lastNSongs int, playlistPath string) ([]Song, error) {
return songs, nil
}
lines := strings.Split(string(out), "\n")
for _, song := range lines {
for _, song := range strings.Split(string(out), "\n") {
ts := strings.Split(song, "|")
if len(ts) <= 1 {
continue