0.1.92 upd

This commit is contained in:
Michael Wain 2025-02-23 02:58:43 +03:00
parent 0fca1aea5a
commit db366cfba3
3 changed files with 9 additions and 2 deletions

2
Cargo.lock generated
View File

@ -90,7 +90,7 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "itunesdb"
version = "0.1.90"
version = "0.1.92"
dependencies = [
"bincode",
"env_logger",

View File

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

View File

@ -279,6 +279,13 @@ impl XDatabase {
}
false
}
pub fn get_unique_id_by_dbid(&mut self, dbid: u64) -> Option<u32> {
if let XSomeList::TrackList(tracks) = &mut self.find_dataset(1).child {
return Some(tracks.iter().find(|t| t.data.dbid == dbid)?.data.unique_id);
}
None
}
pub fn get_unique_id(&mut self) -> u32 {
if let XSomeList::TrackList(tracks) = &mut self.find_dataset(1).child {