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

@@ -29,7 +29,7 @@ fn get_metadata(queue: Arc<Queue>) -> HashMap<String, Variant<Box<RefArg>>> {
"mpris:trackid".to_string(),
Variant(Box::new(
track
.map(|t| format!("spotify:track:{}", t.id))
.map(|t| format!("spotify:track:{}", t.id.clone().unwrap_or("0".to_string())))
.unwrap_or_default(),
)),
);