another quick refactor

This commit is contained in:
Drew Weymouth
2023-04-29 10:26:30 -07:00
parent 31e82ae367
commit c138be381e
+3 -5
View File
@@ -51,11 +51,9 @@ func TrackIDOrEmptyStr(track *subsonic.Child) string {
}
func TracksToIDs(tracks []*subsonic.Child) []string {
ret := make([]string, len(tracks))
for i, tr := range tracks {
ret[i] = tr.ID
}
return ret
return MapSlice(tracks, func(tr *subsonic.Child) string {
return tr.ID
})
}
type TrackReorderOp int