summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2019-01-21 19:19:29 +0000
committerRichard Hughes <richard@hughsie.com>2019-01-23 15:56:25 +0000
commitf36d72cb588325f8bbd84c39737bb788acc1c43c (patch)
treee916768bf593293d0e6824ad03e4abefe3f3eff1
parent44a95049424dbed2965638deeef5b6e7e2cab62a (diff)
downloadappstream-glib-f36d72cb588325f8bbd84c39737bb788acc1c43c.tar.gz
as-content-rating: Add missing OARS → CSM mappings
These mappings were missing from the table, which could result in as_content_rating_id_value_to_csm_age() returning 0 for some #AsContentRatingValues even though it would return >0 for a less-intense #AsContentRatingValue for the same ID. Fix that by adding additional mappings. There’s no child psychology knowledge behind the choices: they’re simply copies of the next age for the same ID, chosen to avoid exposing young children to content which the mappings didn’t already explicitly expose them to. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://github.com/hughsie/appstream-glib/issues/280
-rw-r--r--libappstream-glib/as-content-rating.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libappstream-glib/as-content-rating.c b/libappstream-glib/as-content-rating.c
index 09d94d8..44969aa 100644
--- a/libappstream-glib/as-content-rating.c
+++ b/libappstream-glib/as-content-rating.c
@@ -242,6 +242,8 @@ as_content_rating_id_value_to_csm_age (const gchar *id, AsContentRatingValue val
{ "violence-bloodshed", AS_CONTENT_RATING_VALUE_MODERATE, 11 },
{ "violence-bloodshed", AS_CONTENT_RATING_VALUE_INTENSE, 18 },
{ "violence-sexual", AS_CONTENT_RATING_VALUE_NONE, 0 },
+ { "violence-sexual", AS_CONTENT_RATING_VALUE_MILD, 18 },
+ { "violence-sexual", AS_CONTENT_RATING_VALUE_MODERATE, 18 },
{ "violence-sexual", AS_CONTENT_RATING_VALUE_INTENSE, 18 },
{ "drugs-alcohol", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "drugs-alcohol", AS_CONTENT_RATING_VALUE_MILD, 11 },
@@ -254,9 +256,11 @@ as_content_rating_id_value_to_csm_age (const gchar *id, AsContentRatingValue val
{ "drugs-tobacco", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "drugs-tobacco", AS_CONTENT_RATING_VALUE_MILD, 10 },
{ "drugs-tobacco", AS_CONTENT_RATING_VALUE_MODERATE, 13 },
+ { "drugs-tobacco", AS_CONTENT_RATING_VALUE_INTENSE, 13 },
{ "sex-nudity", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "sex-nudity", AS_CONTENT_RATING_VALUE_MILD, 12 },
{ "sex-nudity", AS_CONTENT_RATING_VALUE_MODERATE, 14 },
+ { "sex-nudity", AS_CONTENT_RATING_VALUE_INTENSE, 14 },
{ "sex-themes", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "sex-themes", AS_CONTENT_RATING_VALUE_MILD, 13 },
{ "sex-themes", AS_CONTENT_RATING_VALUE_MODERATE, 14 },
@@ -288,12 +292,18 @@ as_content_rating_id_value_to_csm_age (const gchar *id, AsContentRatingValue val
{ "social-chat", AS_CONTENT_RATING_VALUE_MODERATE, 10 },
{ "social-chat", AS_CONTENT_RATING_VALUE_INTENSE, 13 },
{ "social-audio", AS_CONTENT_RATING_VALUE_NONE, 0 },
+ { "social-audio", AS_CONTENT_RATING_VALUE_MILD, 15 },
+ { "social-audio", AS_CONTENT_RATING_VALUE_MODERATE, 15 },
{ "social-audio", AS_CONTENT_RATING_VALUE_INTENSE, 15 },
{ "social-contacts", AS_CONTENT_RATING_VALUE_NONE, 0 },
+ { "social-contacts", AS_CONTENT_RATING_VALUE_MILD, 12 },
+ { "social-contacts", AS_CONTENT_RATING_VALUE_MODERATE, 12 },
{ "social-contacts", AS_CONTENT_RATING_VALUE_INTENSE, 12 },
{ "social-info", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "social-info", AS_CONTENT_RATING_VALUE_INTENSE, 13 },
{ "social-location", AS_CONTENT_RATING_VALUE_NONE, 0 },
+ { "social-location", AS_CONTENT_RATING_VALUE_MILD, 13 },
+ { "social-location", AS_CONTENT_RATING_VALUE_MODERATE, 13 },
{ "social-location", AS_CONTENT_RATING_VALUE_INTENSE, 13 },
/* v1.1 additions */
{ "social-info", AS_CONTENT_RATING_VALUE_MILD, 0 },
@@ -313,6 +323,7 @@ as_content_rating_id_value_to_csm_age (const gchar *id, AsContentRatingValue val
{ "sex-adultery", AS_CONTENT_RATING_VALUE_MODERATE, 10 },
{ "sex-adultery", AS_CONTENT_RATING_VALUE_INTENSE, 18 },
{ "sex-appearance", AS_CONTENT_RATING_VALUE_NONE, 0 },
+ { "sex-appearance", AS_CONTENT_RATING_VALUE_MILD, 10 },
{ "sex-appearance", AS_CONTENT_RATING_VALUE_MODERATE, 10 },
{ "sex-appearance", AS_CONTENT_RATING_VALUE_INTENSE, 15 },
{ "violence-worship", AS_CONTENT_RATING_VALUE_NONE, 0 },