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

Function remove_playlist

src/utils/db_utils.rs:360–372  ·  view source on GitHub ↗
(playlist: QueryablePlaylist, refresh_cb: Arc<Box<dyn Fn() + Send + Sync>>)

Source from the content-addressed store, hash-verified

358
359#[tracing::instrument(level = "debug", skip(playlist, refresh_cb))]
360pub 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))]
375pub fn export_playlist(playlist: QueryablePlaylist) {

Callers 1

remove_from_libraryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected