[grilo-plugins] optical-media: Ignore non video media



commit 496c2dd6d34ac2875916268d3436345173844805
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jan 10 14:34:12 2014 +0100

    optical-media: Ignore non video media
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703619

 src/optical-media/grl-optical-media.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/optical-media/grl-optical-media.c b/src/optical-media/grl-optical-media.c
index efe5bbe..b4a6ff7 100644
--- a/src/optical-media/grl-optical-media.c
+++ b/src/optical-media/grl-optical-media.c
@@ -406,6 +406,8 @@ entry_parsed_cb (TotemPlParser *parser,
                  GHashTable    *metadata,
                  BrowseData    *data)
 {
+  char *scheme;
+
   g_return_if_fail (data->media != NULL);
   if (grl_media_get_url (data->media) != NULL) {
     GRL_WARNING ("Was going to set media '%s' to URL '%s' but already has URL '%s'",
@@ -415,7 +417,10 @@ entry_parsed_cb (TotemPlParser *parser,
     return;
   }
 
-  grl_media_set_url (data->media, uri);
+  scheme = g_uri_parse_scheme (uri);
+  if (scheme != NULL && !g_str_equal (scheme, "file"))
+    grl_media_set_url (data->media, uri);
+  g_free (scheme);
 }
 
 static void


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