[totem] main: Hide source which provide torrent URLs



commit f9e5ef0740c02286cc4e2952c3a41074a7e33a6a
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Dec 3 13:00:13 2014 +0100

    main: Hide source which provide torrent URLs
    
    As we don't have GStreamer support for them yet.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=741063

 src/totem-grilo.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index 41ac070..7408a9b 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -257,7 +257,7 @@ source_is_recent (GrlSource *source)
 }
 
 static gboolean
-source_is_adult (GrlSource *source)
+source_is_forbidden (GrlSource *source)
 {
        const char **tags;
 
@@ -265,7 +265,8 @@ source_is_adult (GrlSource *source)
        if (!tags)
                return FALSE;
 
-       return strv_has_prefix (tags, "adult");
+       return strv_has_prefix (tags, "adult") ||
+               strv_has_prefix (tags, "torrent");
 }
 
 static gchar *
@@ -1243,7 +1244,7 @@ source_added_cb (GrlRegistry *registry,
        const char *id;
 
        if (source_is_blacklisted (source) ||
-           source_is_adult (source) ||
+           source_is_forbidden (source) ||
            !(grl_source_get_supported_media (source) & GRL_MEDIA_TYPE_VIDEO)) {
                grl_registry_unregister_source (registry,
                                                source,


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