Skip to content

Commit

Permalink
Merge pull request #697 from JakeStanger/refactor/dbus-error
Browse files Browse the repository at this point in the history
refactor(mpris): better logging, avoid panic on dbus error
  • Loading branch information
JakeStanger authored Aug 10, 2024
2 parents 860a676 + 1899757 commit bba345a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/clients/music/mpris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ impl Client {
)) if transport_error.name() == Some(NO_ACTIVE_PLAYER)
|| transport_error.name() == Some(NO_REPLY) =>
{
Vec::new()
vec![]
}
_ => {
error!("D-Bus error getting MPRIS players: {e:?}");
vec![]
}
_ => panic!("Failed to connect to D-Bus"),
});
// Acquire the lock of current_player before players to avoid deadlock.
// There are places where we lock on current_player and players, but we always lock on current_player first.
Expand Down

0 comments on commit bba345a

Please sign in to comment.