diff --git a/Cargo.lock b/Cargo.lock index 48103ea..69eb626 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,7 +90,7 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "itunesdb" -version = "0.1.84" +version = "0.1.86" dependencies = [ "bincode", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index c58ebd6..5b5bcb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "itunesdb" -version = "0.1.85" +version = "0.1.86" edition = "2021" authors = ["alterwain"] diff --git a/src/artworkdb.rs b/src/artworkdb.rs index 1ca342b..fafeacb 100644 --- a/src/artworkdb.rs +++ b/src/artworkdb.rs @@ -236,7 +236,7 @@ pub mod aobjects { fn get_last_cor_id(&mut self) -> u32{ let files = self.find_dataset(3); let image_files = &mut files.child; - image_files.iter().map(|p| p.file.as_ref().unwrap().correlation_id).max().unwrap_or(1028) + 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 { @@ -285,7 +285,7 @@ pub mod aobjects { unk2: 0, }, str: Some( - [":F", &last_cor_id.to_string(), "_1.ithmb"].concat(), + [":F", &(last_cor_id + 1).to_string(), "_1.ithmb"].concat(), ), } ), @@ -322,7 +322,7 @@ pub mod aobjects { unk2: 0, }, str: Some( - [":F", &last_cor_id.to_string(), "_1.ithmb"].concat(), + [":F", &(last_cor_id + 2).to_string(), "_1.ithmb"].concat(), ), } ),