MCPcopy Create free account
hub / github.com/Moosync/Moosync / get_sort_cx_items

Function get_sort_cx_items

src/utils/songs.rs:102–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100
101#[tracing::instrument(level = "debug", skip())]
102pub fn get_sort_cx_items<T>() -> Vec<ContextMenuItemInner<T>>
103where
104 T: Send + Sync,
105{
106 vec![
107 ContextMenuItemInner::new_with_handler(
108 "Album (Track No.)".into(),
109 |_, _| sort_by_album(),
110 None,
111 ),
112 ContextMenuItemInner::new_with_handler("Artist".into(), |_, _| sort_by_artist(), None),
113 ContextMenuItemInner::new_with_handler("Date Added".into(), |_, _| sort_by_date(), None),
114 ContextMenuItemInner::new_with_handler("Genre".into(), |_, _| sort_by_genre(), None),
115 ContextMenuItemInner::new_with_handler(
116 "Play count".into(),
117 |_, _| sort_by_playcount(),
118 None,
119 ),
120 ContextMenuItemInner::new_with_handler("Title".into(), |_, _| sort_by_title(), None),
121 ]
122}
123
124pub async fn fetch_lyrics(song: &Option<Song>) -> Option<String> {
125 tracing::debug!("Fetching lyrics");

Callers 1

get_menu_itemsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected