0.1.62 upd

This commit is contained in:
Michael Wain 2025-02-20 20:11:45 +03:00
parent 0aed5f45cc
commit 22eae1627a
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "itunesdb"
version = "0.1.61"
version = "0.1.62"
edition = "2021"
authors = ["alterwain"]

View File

@ -317,4 +317,14 @@ impl XDatabase {
playlists.push(playlist);
}
}
pub fn remove_playlist(&mut self, pl_id: u64) {
if let XSomeList::Playlists(playlists) = &mut self.find_dataset(2).child {
playlists.retain_mut(|p| p.data.persistent_playlist_id != pl_id);
}
if let XSomeList::Playlists(playlists) = &mut self.find_dataset(3).child {
playlists.retain_mut(|p| p.data.persistent_playlist_id != pl_id);
}
}
}