[grilo-plugins] upnp: Implement search all elements



commit 3f6e75531393355fe3977917960bef30a39ed3c3
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Thu Feb 3 12:59:49 2011 +0000

    upnp: Implement search all elements
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 src/upnp/grl-upnp.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/upnp/grl-upnp.c b/src/upnp/grl-upnp.c
index 6b25b75..5a830f0 100644
--- a/src/upnp/grl-upnp.c
+++ b/src/upnp/grl-upnp.c
@@ -67,6 +67,9 @@ GRL_LOG_DOMAIN_STATIC(upnp_log_domain);
   "upnp:album contains \"%s\" or "			\
   "upnp:artist contains \"%s\""
 
+#define UPNP_SEARCH_ALL                         \
+  "upnp:class derivedfrom \"object.item\""
+
 struct _GrlUpnpPrivate {
   GUPnPDeviceProxy* device;
   GUPnPServiceProxy* service;
@@ -488,7 +491,11 @@ get_upnp_filter (const GList *keys)
 static gchar *
 get_upnp_search (const gchar *text)
 {
-  return g_strdup_printf (UPNP_SEARCH_SPEC, text, text, text);
+  if (text) {
+    return g_strdup_printf (UPNP_SEARCH_SPEC, text, text, text);
+  } else {
+    return g_strdup (UPNP_SEARCH_ALL);
+  }
 }
 
 static void



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