show different ctx menu in PlayQueueList when selection contains radios

This commit is contained in:
Drew Weymouth
2024-06-02 08:38:46 -07:00
parent 50a66284bb
commit 8de689dee4
2 changed files with 123 additions and 67 deletions
+6
View File
@@ -30,6 +30,12 @@ func SelectedTracks(items []*TrackListModel) []*mediaprovider.Track {
})
}
func SelectedItems(items []*TrackListModel) []mediaprovider.MediaItem {
return sharedutil.FilterMapSlice(items, func(tm *TrackListModel) (mediaprovider.MediaItem, bool) {
return tm.Item, tm.Selected
})
}
func SelectedItemIDs(items []*TrackListModel) []string {
return sharedutil.FilterMapSlice(items, func(tm *TrackListModel) (string, bool) {
return tm.Item.Metadata().ID, tm.Selected