diff --git a/Cargo.toml b/Cargo.toml index 5b5bcb4..c5f1336 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "itunesdb" -version = "0.1.86" +version = "0.1.87" edition = "2021" authors = ["alterwain"] diff --git a/src/artworkdb.rs b/src/artworkdb.rs index fafeacb..46b7c48 100644 --- a/src/artworkdb.rs +++ b/src/artworkdb.rs @@ -239,7 +239,7 @@ pub mod aobjects { image_files.iter().map(|p| p.file.as_ref().unwrap().correlation_id).max().unwrap_or(1027) } - pub fn add_images(&mut self, small_image_path: &str, large_image_path: &str, song_dbid: u64) -> u32 { + pub fn add_images(&mut self, small_image_path: &str, large_image_path: &str, song_dbid: u64) -> (String, String) { let last_cor_id = self.get_last_cor_id(); let ds = self.find_dataset(1); let image_items = &mut ds.child; @@ -330,7 +330,6 @@ pub mod aobjects { ), }; - image_items.push(AImageItem { tag: vec![small_tag, large_tag], data: Some(image_item), @@ -365,7 +364,7 @@ pub mod aobjects { }, ]); self.data.as_mut().unwrap().next_id_for_mhii = new_id + 1; - new_id + (["F", &(last_cor_id + 1).to_string(), "_1.ithmb"].concat(), ["F", &(last_cor_id + 2).to_string(), "_1.ithmb"].concat()) } }