diff --git a/Cargo.lock b/Cargo.lock index 347ff2b..f87b00e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,7 +90,7 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "itunesdb" -version = "0.1.50" +version = "0.1.52" dependencies = [ "bincode", "env_logger", diff --git a/Cargo.toml b/Cargo.toml index ddacb03..01d7bae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "itunesdb" -version = "0.1.51" +version = "0.1.52" edition = "2021" authors = ["alterwain"] diff --git a/src/xobjects.rs b/src/xobjects.rs index 8ec4976..3d1e476 100644 --- a/src/xobjects.rs +++ b/src/xobjects.rs @@ -1,7 +1,7 @@ use rand::Rng; use crate::objects::{AlbumItem, ChunkHeader, DataSet, Database, JumpTable, LetterJumpEntry, ListSortOrder, Playlist, PlaylistIndexEntry, PlaylistItem, TrackItem}; - +use crate::xobjects::XPlArgument::RawArgument; #[derive(Debug, serde::Serialize)] pub struct XDatabase { @@ -251,8 +251,8 @@ impl XDatabase { if playlist.is_none() { return; } let playlist = playlist.unwrap(); playlist.data.playlist_item_count += 1; - let mut pl_item = PlaylistItem::new(track.data.unique_id, rand::random()); - playlist.elems.push((pl_item, Vec::new())); + let pl_item = PlaylistItem::new(track.data.unique_id, rand::random()); + playlist.elems.push((pl_item, vec![RawArgument(vec![ 0x6D, 0x68, 0x6F, 0x64, 0x18, 0x0, 0x0, 0x0, 0x88, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00])])); } }