projects
/
xsetrootd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6336104
)
Fix typo in playback status key retrieval
author
Jacob Casper
<dev@jacobcasper.com>
Fri, 13 Nov 2020 22:50:29 +0000
(16:50 -0600)
committer
Jacob Casper
<dev@jacobcasper.com>
Fri, 13 Nov 2020 22:50:40 +0000
(16:50 -0600)
src/main.rs
patch
|
blob
|
blame
|
history
diff --git
a/src/main.rs
b/src/main.rs
index
ca15fa2
..
800cf54
100644
(file)
--- a/
src/main.rs
+++ b/
src/main.rs
@@
-55,7
+55,7
@@
fn update_map(arc_map: Arc<Mutex<HashMap<String, String>>>, key: &str, val: &str
.arg("-name")
.arg(format!(
"[{playback_status} {title} - {artist}] | ✉ {unread_count} | {date_time}",
.arg("-name")
.arg(format!(
"[{playback_status} {title} - {artist}] | ✉ {unread_count} | {date_time}",
- playback_status = map.get("playback
-
status").unwrap_or(&String::from("🔈")),
+ playback_status = map.get("playback
_
status").unwrap_or(&String::from("🔈")),
title = map.get("title").unwrap_or(&String::from("")),
artist = map.get("artist").unwrap_or(&String::from("")),
unread_count = map.get("unread_count").unwrap_or(&String::from("?")),
title = map.get("title").unwrap_or(&String::from("")),
artist = map.get("artist").unwrap_or(&String::from("")),
unread_count = map.get("unread_count").unwrap_or(&String::from("?")),
@@
-125,7
+125,7
@@
fn main() -> Result<(), Box<dyn std::error::Error>> {
update_map(
spotify_match_map.clone(),
"playback_status",
update_map(
spotify_match_map.clone(),
"playback_status",
- match &*playback_status.as_str().unwrap_or("
🔈
") {
+ match &*playback_status.as_str().unwrap_or("") {
"Playing" => "🔊",
_ => "🔈",
},
"Playing" => "🔊",
_ => "🔈",
},