fullscreen play queue renders correctly

This commit is contained in:
Drew Weymouth
2024-03-02 16:01:14 -08:00
parent a75222d381
commit b8ab480294
4 changed files with 170 additions and 43 deletions
+10
View File
@@ -58,6 +58,16 @@ func SelectTrackRange(tracks []*TrackListModel, idx int) {
}
}
func FindTrackByID(tracks []*TrackListModel, id string) (*mediaprovider.Track, int) {
idx := sharedutil.Find(tracks, func(tr *TrackListModel) bool {
return tr.Track.ID == id
})
if idx >= 0 {
return tracks[idx].Track, idx
}
return nil, -1
}
func minInt(a, b int) int {
if a < b {
return a