0.1.90 upd
This commit is contained in:
parent
2a867778b7
commit
d37957a9a0
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -90,7 +90,7 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itunesdb"
|
name = "itunesdb"
|
||||||
version = "0.1.88"
|
version = "0.1.90"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "itunesdb"
|
name = "itunesdb"
|
||||||
version = "0.1.89"
|
version = "0.1.90"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["alterwain"]
|
authors = ["alterwain"]
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ pub mod aobjects {
|
|||||||
self.children.iter_mut().find(|d| d.data.data_type == p0).unwrap()
|
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 ds = self.find_dataset(1);
|
||||||
let image_items = &mut ds.child;
|
let image_items = &mut ds.child;
|
||||||
let new_id = image_items.last().map_or(100, |p| p.data.as_ref().unwrap().id + 1);
|
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,
|
unk2: 0,
|
||||||
},
|
},
|
||||||
str: Some(
|
str: Some(
|
||||||
[":F", &format!("{:X}", song_unique) ,".ithmb"].concat(),
|
[":", &format!("{:X}", cover_hash) ,".ithmb"].concat(),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
@ -315,7 +315,7 @@ pub mod aobjects {
|
|||||||
unk2: 0,
|
unk2: 0,
|
||||||
},
|
},
|
||||||
str: Some(
|
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;
|
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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user