| 358 | |
| 359 | #[tracing::instrument(level = "debug", skip(playlist, refresh_cb))] |
| 360 | pub fn remove_playlist(playlist: QueryablePlaylist, refresh_cb: Arc<Box<dyn Fn() + Send + Sync>>) { |
| 361 | if playlist.playlist_id.is_none() { |
| 362 | return; |
| 363 | } |
| 364 | |
| 365 | spawn_local(async move { |
| 366 | let res = super::invoke::remove_playlist(playlist.playlist_id.unwrap()).await; |
| 367 | if let Err(res) = res { |
| 368 | tracing::error!("Failed to remove playlist: {:?}", res); |
| 369 | } |
| 370 | refresh_cb.as_ref()(); |
| 371 | }); |
| 372 | } |
| 373 | |
| 374 | #[tracing::instrument(level = "debug", skip(playlist))] |
| 375 | pub fn export_playlist(playlist: QueryablePlaylist) { |