Fix trackid replacing string with d-bus path

This commit is contained in:
r4v3n6101
2020-08-20 18:12:47 +03:00
committed by Henrik Friedrichsen
parent e5bc12b1ba
commit 97d3468392

View File

@@ -38,7 +38,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(),