[PATCH] tools/bluetooth-player: current-folder command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add current-folder command listing path to the current folder
---
 tools/bluetooth-player.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tools/bluetooth-player.c b/tools/bluetooth-player.c
index f10d9be..1c0348e 100644
--- a/tools/bluetooth-player.c
+++ b/tools/bluetooth-player.c
@@ -891,6 +891,23 @@ done:
 	rl_printf("Attempting to list items\n");
 }
 
+static void cmd_current_folder(int argc, char *argv[])
+{
+	GDBusProxy *proxy;
+	GDBusProxy *folder;
+
+	if (check_default_player() == FALSE)
+		return;
+
+	proxy = default_player;
+	folder = find_folder(g_dbus_proxy_get_path(proxy));
+
+	if (folder == NULL)
+		return;
+
+	print_property(folder, "Name");
+}
+
 static void search_setup(DBusMessageIter *iter, void *user_data)
 {
 	char *string = user_data;
@@ -1023,6 +1040,8 @@ static const struct {
 						"Change current folder" },
 	{ "list-items", "[start] [end]",  cmd_list_items,
 					"List items of current folder" },
+	{ "current-folder", NULL,     cmd_current_folder,
+					"Show current folder name and path" },
 	{ "search",     "string",     cmd_search,
 					"Search items containing string" },
 	{ "queue",       "<item>",    cmd_queue, "Add item to playlist queue" },
-- 
1.8.3.2

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux