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

Method current_or_list

src/utils/context_menu.rs:74–88  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

72{
73 #[tracing::instrument(level = "debug", skip(self))]
74 fn current_or_list(&self) -> Vec<Song> {
75 let selected_songs = self.selected_songs.get();
76 let ret = if selected_songs.is_empty() {
77 if let Some(song) = self.current_song.as_ref() {
78 vec![song.clone()]
79 } else {
80 vec![]
81 }
82 } else {
83 get_songs_from_indices(&self.song_list, self.selected_songs)
84 };
85
86 tracing::debug!("Got songs {:?}", ret);
87 ret
88 }
89
90 #[tracing::instrument(level = "debug", skip(self))]
91 pub fn play_now(&self) {

Callers 9

play_nowMethod · 0.80
add_to_queueMethod · 0.80
play_nextMethod · 0.80
clear_queue_and_playMethod · 0.80
add_to_libraryMethod · 0.80
remove_from_libraryMethod · 0.80
add_to_playlistMethod · 0.80
remove_from_playlistMethod · 0.80
get_menu_itemsMethod · 0.80

Calls 2

get_songs_from_indicesFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected