diff --git a/Cargo.toml b/Cargo.toml index 3643775..879e0cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "itunesdb" -version = "0.1.65" +version = "0.1.66" edition = "2021" authors = ["alterwain"] diff --git a/src/xobjects.rs b/src/xobjects.rs index 4673e88..c7b850b 100644 --- a/src/xobjects.rs +++ b/src/xobjects.rs @@ -254,6 +254,16 @@ impl XDatabase { return n + 1; } } + if let XSomeList::Playlists(playlists) = &mut self.find_dataset(2).child { + for playlist in playlists { + if playlist.data.is_master_playlist_flag != 0 { + let a = playlist.args.iter().filter(|s| matches!(s, RawArgument(b))).last().unwrap(); + if let RawArgument(b) = a { + return u32::from_le_bytes([b[12], b[13], b[14], b[15]]); + } + } + } + } 1 }