diff --git a/Cargo.lock b/Cargo.lock index 56abdcf3..6cbfb0da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,7 +15,7 @@ dependencies = [ "protobuf 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf_macros 0.1.2 (git+https://github.com/plietar/rust-protobuf-macros.git)", "rand 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "shannon 0.1.1 (git+https://github.com/plietar/rust-shannon.git)", @@ -316,7 +316,7 @@ dependencies = [ [[package]] name = "rpassword" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/src/lib.rs b/src/lib.rs index 586f4336..66a8c52d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ #![crate_name = "librespot"] -#![feature(plugin,zero_one,iter_arith,mpsc_select,clone_from_slice)] +#![feature(plugin,zero_one,iter_arith,mpsc_select)] #![plugin(protobuf_macros)] #![plugin(json_macros)] diff --git a/src/metadata.rs b/src/metadata.rs index d3ac8b00..2cdcd73e 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -73,6 +73,7 @@ impl MetadataTrait for Track { album: SpotifyId::from_raw(msg.get_album().get_gid()), files: msg.get_file() .iter() + .filter(|file| file.has_file_id()) .map(|file| { let mut dst = [0u8; 20]; dst.clone_from_slice(&file.get_file_id()); @@ -108,6 +109,7 @@ impl MetadataTrait for Album { covers: msg.get_cover_group() .get_image() .iter() + .filter(|image| image.has_file_id()) .map(|image| { let mut dst = [0u8; 20]; dst.clone_from_slice(&image.get_file_id()); diff --git a/src/spirc.rs b/src/spirc.rs index 9b779596..cb82934d 100644 --- a/src/spirc.rs +++ b/src/spirc.rs @@ -156,7 +156,7 @@ impl SpircManager { self.tracks = frame.get_state() .get_track() .iter() - .filter(|track| track.get_gid().len()==16) + .filter(|track| track.has_gid()) .map(|track| SpotifyId::from_raw(track.get_gid())) .collect();