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

Method remove_from_playlist

src-tauri/database/src/database.rs:960–976  ·  view source on GitHub ↗
(&self, id: String, songs: Vec<String>)

Source from the content-addressed store, hash-verified

958
959 #[tracing::instrument(level = "debug", skip(self))]
960 pub fn remove_from_playlist(&self, id: String, songs: Vec<String>) -> Result<()> {
961 trace!("Removing from playlist");
962 self.pool
963 .get()
964 .unwrap()
965 .transaction::<(), MoosyncError, _>(|conn| {
966 for s in songs {
967 delete(playlist_bridge)
968 .filter(schema::playlist_bridge::playlist.eq(id.clone()))
969 .filter(schema::playlist_bridge::song.eq(s.clone()))
970 .execute(conn)?;
971 }
972 Ok(())
973 })?;
974 info!("Removed from playlist");
975 Ok(())
976 }
977
978 #[tracing::instrument(level = "debug", skip(self))]
979 pub fn remove_playlist(&self, id: String) -> Result<()> {

Callers 1

test_playlist_operationsFunction · 0.45

Calls 3

getMethod · 0.80
cloneMethod · 0.80
eqMethod · 0.45

Tested by 1

test_playlist_operationsFunction · 0.36