Fix: gracefully handle invalid DBus setups

Some systems may have an ncspot binary with enabled MPRIS/DBus support, even
though DBus is not actually running on the system or the session is broken.

ncspot should not panic in such a situation, but handle gracefully instead.

Should help with #1139
This commit is contained in:
Henrik Friedrichsen
2023-05-02 22:54:47 +02:00
parent cb9d9e7a93
commit 2771c319d6
2 changed files with 11 additions and 4 deletions

View File

@@ -365,7 +365,7 @@ fn main() -> Result<(), String> {
spotify.update_status(state.clone());
#[cfg(feature = "mpris")]
mpris_manager.update()?;
mpris_manager.update();
#[cfg(unix)]
ipc.publish(&state, queue.get_current());