adapt to new rspotify structures

these changes are necessary to handle playlists with local tracks properly
This commit is contained in:
Henrik Friedrichsen
2019-04-17 18:25:00 +02:00
parent 0bbba3c57d
commit 0de6ad2dfe
6 changed files with 64 additions and 29 deletions

View File

@@ -9,7 +9,7 @@ use traits::ListItem;
#[derive(Clone, Deserialize, Serialize)]
pub struct Track {
pub id: String,
pub id: Option<String>,
pub title: String,
pub track_number: u32,
pub disc_number: i32,
@@ -104,7 +104,7 @@ impl fmt::Debug for Track {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"({} - {} ({}))",
"({} - {} ({:?}))",
self.artists.join(", "),
self.title,
self.id