From 5e1c31eefb5c035d8375c8ec6f9f423844f7366c Mon Sep 17 00:00:00 2001 From: r4v3n6101 Date: Tue, 17 Nov 2020 22:02:40 +0300 Subject: [PATCH] Change to correct trackid --- src/mpris.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mpris.rs b/src/mpris.rs index 8dd2a1b..a1779ee 100644 --- a/src/mpris.rs +++ b/src/mpris.rs @@ -43,7 +43,12 @@ fn get_metadata(playable: Option) -> 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(),