According to tests it is equal performance wise, so why not make a code shorter.
This commit is contained in:
parent
7d447be786
commit
c4532fea24
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user