Message ID | 20240106221626.8140-2-contact@willowbarraco.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] mpris-proxy: add --target to target a specific player | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=814873 ---Test result--- Test Summary: CheckPatch PASS 0.32 seconds GitLint PASS 0.21 seconds BuildEll PASS 23.60 seconds BluezMake PASS 706.83 seconds MakeCheck PASS 12.02 seconds MakeDistcheck PASS 157.79 seconds CheckValgrind PASS 220.22 seconds CheckSmatch PASS 323.93 seconds bluezmakeextell PASS 105.13 seconds IncrementalBuild PASS 667.43 seconds ScanBuild PASS 918.76 seconds --- Regards, Linux Bluetooth
diff --git a/tools/mpris-proxy.c b/tools/mpris-proxy.c index e5fc91fdb..dc328031b 100644 --- a/tools/mpris-proxy.c +++ b/tools/mpris-proxy.c @@ -53,6 +53,7 @@ static GSList *transports = NULL; static gboolean option_version = FALSE; static gboolean option_export = FALSE; +static gchar *option_target = ""; struct tracklist { GDBusProxy *proxy; @@ -428,6 +429,11 @@ static void add_player(DBusConnection *conn, const char *name, if (!adapter) return; + if (strcmp(option_target, "") && strcmp(name, option_target)) { + printf("Not the target player, skipped\n"); + return; + } + player = find_player_by_bus_name(name); if (player == NULL) { reply = get_all(conn, name); @@ -733,6 +739,8 @@ static GOptionEntry options[] = { "Show version information and exit" }, { "export", 'e', 0, G_OPTION_ARG_NONE, &option_export, "Export remote players" }, + { "target", 't', 0, G_OPTION_ARG_STRING, &option_target, + "Target a specific player" }, { NULL }, };
Signed-off-by: Willow Barraco <contact@willowbarraco.fr> --- v2: Fix CI warning tools/mpris-proxy.c | 8 ++++++++ 1 file changed, 8 insertions(+)