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

Method remove_song

src-tauri/src/extensions/request_handler.rs:102–108  ·  view source on GitHub ↗
(&self, data: Song)

Source from the content-addressed store, hash-verified

100
101 #[tracing::instrument(level = "debug", skip(self, data))]
102 pub fn remove_song(&self, data: Song) -> Result<MainCommandResponse> {
103 let database: State<'_, Database> = self.app_handle.state();
104 if let Some(song_id) = data.song._id {
105 database.remove_songs(vec![song_id])?;
106 }
107 Ok(MainCommandResponse::RemoveSong(true))
108 }
109
110 #[tracing::instrument(level = "debug", skip(self, data))]
111 pub fn get_preferences(&self, data: PreferenceData) -> Result<MainCommandResponse> {

Callers 1

handle_requestMethod · 0.80

Calls 1

remove_songsMethod · 0.80

Tested by

no test coverage detected