| 100 | |
| 101 | #[tracing::instrument(level = "debug", skip())] |
| 102 | pub fn get_sort_cx_items<T>() -> Vec<ContextMenuItemInner<T>> |
| 103 | where |
| 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 | |
| 124 | pub async fn fetch_lyrics(song: &Option<Song>) -> Option<String> { |
| 125 | tracing::debug!("Fetching lyrics"); |