(songs: Vec<Song>, refresh_cb: Arc<Box<dyn Fn() + Send + Sync>>)
| 298 | |
| 299 | #[tracing::instrument(level = "debug", skip(songs, refresh_cb))] |
| 300 | pub fn add_songs_to_library(songs: Vec<Song>, refresh_cb: Arc<Box<dyn Fn() + Send + Sync>>) { |
| 301 | spawn_local(async move { |
| 302 | let res = super::invoke::insert_songs(songs).await; |
| 303 | if res.is_err() { |
| 304 | tracing::error!("Error adding songs: {:?}", res); |
| 305 | } else { |
| 306 | refresh_cb.as_ref()(); |
| 307 | } |
| 308 | }); |
| 309 | } |
| 310 | |
| 311 | #[tracing::instrument(level = "debug", skip(songs, refresh_cb))] |
| 312 | pub fn remove_songs_from_library(songs: Vec<Song>, refresh_cb: Arc<Box<dyn Fn() + Send + Sync>>) { |
no outgoing calls
no test coverage detected