[rhythmbox] grilo: Ignore video and image sources



commit 59f03eb9df08309d9ef398ddbda19aeb3f659c83
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Apr 8 16:21:03 2014 +0200

    grilo: Ignore video and image sources
    
    Instead of hard-coding many of the plugins, simply ignore sources
    that don't support audio types.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727838

 plugins/grilo/rb-grilo-plugin.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/grilo/rb-grilo-plugin.c b/plugins/grilo/rb-grilo-plugin.c
index 1f43640..5794b69 100644
--- a/plugins/grilo/rb-grilo-plugin.c
+++ b/plugins/grilo/rb-grilo-plugin.c
@@ -51,19 +51,13 @@
 #define RB_GRILO_PLUGIN_GET_CLASS(o)   (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_GRILO_PLUGIN, 
RBGriloPluginClass))
 
 static const char *ignored_plugins[] = {
-       "grl-apple-trailers",
-       "grl-bliptv",
        "grl-bookmarks",
        "grl-dmap",
        "grl-filesystem",
-       "grl-flickr",
        "grl-magnatune",
        "grl-optical-media",
        "grl-podcasts",
-       "grl-raitv",
-       "grl-tracker",
-       "grl-vimeo",
-       "grl-youtube"
+       "grl-tracker"
 };
 
 typedef struct
@@ -115,6 +109,12 @@ grilo_source_added_cb (GrlRegistry *registry, GrlSource *grilo_source, RBGriloPl
        RBShell *shell;
        int i;
 
+       if (!(grl_source_get_supported_media (grilo_source) & GRL_MEDIA_TYPE_AUDIO)) {
+               rb_debug ("grilo source %s doesn't support audio",
+                         grl_source_get_name (grilo_source));
+               goto ignore;
+       }
+
        grilo_plugin = grl_source_get_plugin (grilo_source);
        for (i = 0; i < G_N_ELEMENTS (ignored_plugins); i++) {
                if (g_str_equal (ignored_plugins[i], grl_plugin_get_id (grilo_plugin))) {


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