0.1.90 upd

This commit is contained in:
Michael Wain 2025-02-22 03:06:05 +03:00
parent 2a867778b7
commit d37957a9a0
3 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View File

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

View File

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

View File

@ -233,7 +233,7 @@ pub mod aobjects {
self.children.iter_mut().find(|d| d.data.data_type == p0).unwrap()
}
pub fn add_images(&mut self, song_dbid: u64, song_unique: u32) -> (String, String) {
pub fn add_images(&mut self, song_dbid: u64, cover_hash: u64) -> (String, String) {
let ds = self.find_dataset(1);
let image_items = &mut ds.child;
let new_id = image_items.last().map_or(100, |p| p.data.as_ref().unwrap().id + 1);
@ -278,7 +278,7 @@ pub mod aobjects {
unk2: 0,
},
str: Some(
[":F", &format!("{:X}", song_unique) ,".ithmb"].concat(),
[":", &format!("{:X}", cover_hash) ,".ithmb"].concat(),
),
}
),
@ -315,7 +315,7 @@ pub mod aobjects {
unk2: 0,
},
str: Some(
[":F", &format!("{:X}", song_unique) ,"_1.ithmb"].concat(),
[":", &format!("{:X}", cover_hash) ,"_1.ithmb"].concat(),
),
}
),
@ -357,7 +357,7 @@ pub mod aobjects {
},
]);
self.data.as_mut().unwrap().next_id_for_mhii = new_id + 1;
(["F", &format!("{:X}", song_unique) ,".ithmb"].concat(), ["F", &format!("{:X}", song_unique) ,"_1.ithmb"].concat())
([&format!("{:X}", cover_hash) ,".ithmb"].concat(), [&format!("{:X}", cover_hash) ,"_1.ithmb"].concat())
}
}