mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Various changes following review
This commit is contained in:
parent
e2e52c78c0
commit
4f0033e81c
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,6 @@
|
|||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate byteorder;
|
||||
extern crate futures;
|
||||
extern crate linear_map;
|
||||
|
@ -192,8 +195,8 @@ pub struct Show {
|
|||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Playlist {
|
||||
pub revision: Vec<u8>,
|
||||
pub user: String,
|
||||
pub length: i32,
|
||||
pub name: String,
|
||||
pub tracks: Vec<SpotifyId>,
|
||||
}
|
||||
|
@ -315,9 +318,13 @@ impl Metadata for Playlist {
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
if tracks.len() != msg.get_length() as usize {
|
||||
warn!("Got {} tracks, but the playlist should contain {} tracks.", tracks.len(), msg.get_length());
|
||||
}
|
||||
|
||||
Playlist {
|
||||
revision: msg.get_revision().to_vec(),
|
||||
name: msg.get_attributes().get_name().to_owned(),
|
||||
length: msg.get_length(),
|
||||
tracks: tracks,
|
||||
user: msg.get_owner_username().to_string(),
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ pub mod keyexchange;
|
|||
pub mod mercury;
|
||||
pub mod metadata;
|
||||
pub mod playlist4changes;
|
||||
pub mod playlist4content;
|
||||
pub mod playlist4issues;
|
||||
pub mod playlist4meta;
|
||||
pub mod playlist4ops;
|
||||
mod playlist4content;
|
||||
mod playlist4issues;
|
||||
mod playlist4meta;
|
||||
mod playlist4ops;
|
||||
pub mod pubsub;
|
||||
pub mod spirc;
|
||||
|
|
Loading…
Reference in a new issue