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

Method get_songs

src-tauri/src/extensions/request_handler.rs:44–56  ·  view source on GitHub ↗
(&self, mut data: GetSongOptions)

Source from the content-addressed store, hash-verified

42
43 #[tracing::instrument(level = "debug", skip(self, data))]
44 pub fn get_songs(&self, mut data: GetSongOptions) -> Result<MainCommandResponse> {
45 let database: State<'_, Database> = self.app_handle.state();
46 if data.album.is_none()
47 && data.artist.is_none()
48 && data.album.is_none()
49 && data.song.is_none()
50 {
51 data.song = Some(SearchableSong::default());
52 }
53
54 let ret = database.get_songs_by_options(data)?;
55 Ok(MainCommandResponse::GetSong(ret))
56 }
57
58 #[tracing::instrument(level = "debug", skip(self, data))]
59 pub fn get_entity(&self, data: GetEntityOptions) -> Result<MainCommandResponse> {

Callers 1

handle_requestMethod · 0.80

Calls 1

get_songs_by_optionsMethod · 0.80

Tested by

no test coverage detected