[totem] main: Blacklist adult sources for now



commit b5fa00fab03c3e27dbc8db54597e5e593f2f3220
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Feb 28 16:19:18 2014 +0100

    main: Blacklist adult sources for now
    
    Until we have a toggle for it in the Privacy settings.

 src/totem-grilo.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index e41d0a2..2b492cb 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -250,6 +250,16 @@ source_is_recent (GrlSource *source)
        return strv_has_prefix (sources, id);
 }
 
+static gboolean
+source_is_adult (GrlSource *source)
+{
+       const char **tags;
+
+       tags = grl_source_get_tags (source);
+
+       return strv_has_prefix (tags, "adult");
+}
+
 static gchar *
 get_secondary_text (GrlMedia *media)
 {
@@ -1207,6 +1217,7 @@ source_added_cb (GrlRegistry *registry,
        const char *id;
 
        if (source_is_blacklisted (source) ||
+           source_is_adult (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]