Duration::from_millis(5000),
);
+ let spotify_match_map = arc_locked_xset_map.clone();
let _ = proxy.match_signal(
move |pc: PropertiesPropertiesChanged, _: &Connection, _: &Message| {
pc.changed_properties["Metadata"]
let key_str = key.as_str()?;
let value = iter.next();
- let arc_locked_xset_map = Arc::clone(&arc_locked_xset_map);
-
match key_str {
"xesam:artist" => {
// Variant holding a variant that should just be a Vec<&str> I
// believe. This is _the recommended_ way to do this by the author.
let inner_value = value?.as_iter()?.next()?.as_iter()?.next()?;
let artist = inner_value.as_str()?;
- update_map(arc_locked_xset_map, "artist", artist);
+ update_map(spotify_match_map.clone(), "artist", artist);
}
"xesam:title" => {
let title = value?.as_iter()?.next()?.as_str()?;
- update_map(arc_locked_xset_map, "title", title);
+ update_map(spotify_match_map.clone(), "title", title);
}
_ => (),
}