gracefully handle error when showing notification

fixes #265
This commit is contained in:
Henrik Friedrichsen
2020-09-07 23:38:13 +02:00
parent 9be4ca8185
commit 69f11cdcf7

View File

@@ -221,10 +221,9 @@ impl Queue {
current.replace(index); current.replace(index);
self.spotify.update_track(); self.spotify.update_track();
if self.spotify.cfg.notify.unwrap_or(false) { if self.spotify.cfg.notify.unwrap_or(false) {
Notification::new() if let Err(e) = Notification::new().summary(&track.to_string()).show() {
.summary(&track.to_string()) error!("error showing notification: {:?}", e);
.show() }
.unwrap();
} }
} }