Skip to content

Commit

Permalink
dont warn when system bus isnt found
Browse files Browse the repository at this point in the history
  • Loading branch information
acrisci committed Nov 4, 2020
1 parent d0a59e2 commit a1cfd4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion playerctl/playerctl-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ GList *pctl_list_player_names_on_bus(GBusType bus_type, GError **err) {
// incorrectly. I think we can pass through here because it is true
// that there are no names on the bus that is supposed to be at
// this socket path. But we need a better way of dealing with this case.
g_warning("D-Bus socket address not found, unable to list player names");
const gchar *message = "D-Bus socket address not found, unable to list player names";
if (bus_type == G_BUS_TYPE_SESSION) {
g_warning("%s", message);
} else {
g_debug("%s", message);
}

g_clear_error(&tmp_error);
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion playerctl/playerctl-player.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static void playerctl_player_init(PlayerctlPlayer *self) {

/*
* Get the matching bus name for this player name. Bus name will be like:
* "org.mpris.MediaPlayer2.{PLAYER_NAME}[.instance{NUM}]"
* "org.mpris.MediaPlayer2.{PLAYER_NAME}[.{INSTANCE}]"
* Pass a NULL player_name to get the first name on the bus
* Returns NULL if no matching bus name is found on the bus.
* Returns an error if there was a problem listing the names on the bus.
Expand Down

0 comments on commit a1cfd4a

Please sign in to comment.