[totem] main: Blacklist adult sources for now
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Blacklist adult sources for now
- Date: Fri, 28 Feb 2014 15:27:17 +0000 (UTC)
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]