Change to correct trackid

This commit is contained in:
r4v3n6101
2020-11-17 22:02:40 +03:00
committed by Henrik Friedrichsen
parent 880fbb3f6e
commit 5e1c31eefb

View File

@@ -43,7 +43,12 @@ fn get_metadata(playable: Option<Playable>) -> Metadata {
hm.insert(
"mpris:trackid".to_string(),
Variant(Box::new(playable.map(|t| t.uri()).unwrap_or_default())),
Variant(Box::new(Path::from(format!(
"/org/ncspot/{}",
playable
.map(|t| t.uri().replace(':', "/"))
.unwrap_or("0".to_string())
)))),
);
hm.insert(
"mpris:length".to_string(),