dont warn when system bus isnt found

This commit is contained in:
Tony Crisci
2020-11-04 12:14:59 -05:00
parent d0a59e22de
commit a1cfd4a790
2 changed files with 8 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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.