0.1.8 upd
This commit is contained in:
parent
7ee3539ded
commit
58a582e797
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "itunesdb"
|
||||
version = "0.1.7"
|
||||
version = "0.1.8"
|
||||
edition = "2021"
|
||||
authors = ["alterwain"]
|
||||
|
||||
|
@ -95,6 +95,20 @@ impl XDatabase {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_playlists(&mut self) -> Vec<XPlaylist> {
|
||||
let mut res_pls = Vec::new();
|
||||
|
||||
if let XSomeList::Playlists(playlists) = &mut self.find_dataset(2).child {
|
||||
res_pls = [&mut res_pls, playlists].concat();
|
||||
}
|
||||
|
||||
if let XSomeList::Playlists(playlists) = &mut self.find_dataset(3).child {
|
||||
res_pls = [&mut res_pls, playlists].concat();
|
||||
}
|
||||
|
||||
res_pls
|
||||
}
|
||||
|
||||
pub fn get_unique_id(&mut self) -> u32 {
|
||||
if let XSomeList::TrackList(tracks) = &mut self.find_dataset(1).child {
|
||||
if let Some(n) = tracks.iter().map(|t| t.data.unique_id).max() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user