[gnome-music] grilo: filter out audio and resolve urls for upnp plugin



commit b6055e9f594d59409b46bd0c6dd639c23634ffe7
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Sat May 10 19:39:40 2014 +0200

    grilo: filter out audio and resolve urls for upnp plugin

 gnomemusic/grilo.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/grilo.py b/gnomemusic/grilo.py
index ad803f3..79068fc 100644
--- a/gnomemusic/grilo.py
+++ b/gnomemusic/grilo.py
@@ -45,6 +45,7 @@ class Grilo(GObject.GObject):
         Grl.METADATA_KEY_ARTIST, Grl.METADATA_KEY_ALBUM,
         Grl.METADATA_KEY_DURATION,
         Grl.METADATA_KEY_CREATION_DATE,
+        Grl.METADATA_KEY_URL,
         Grl.METADATA_KEY_THUMBNAIL]
 
     METADATA_THUMBNAIL_KEYS = [
@@ -206,7 +207,10 @@ class Grilo(GObject.GObject):
         @log
         def _search_callback(source, param, item, remaining, data, error):
             callback(source, param, item, remaining, data)
+
         if self.search_source:
+            if self.search_source.get_id().startswith('grl-upnp'):
+                options.set_type_filter(Grl.TypeFilter.AUDIO)
             self.search_source.search(q, self.METADATA_KEYS, options,
                                       _search_callback, data)
         else:


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