summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2019-01-21 19:13:57 +0000
committerRichard Hughes <richard@hughsie.com>2019-01-23 15:56:25 +0000
commit57b9a5efd9b8751c00c1dcef6a63e3746150b2e7 (patch)
tree1b073608c555059efdc0ba7bd35bfd6ea763c688
parent6b44c80e6ba941933ac56faece29b28c237d4896 (diff)
downloadappstream-glib-57b9a5efd9b8751c00c1dcef6a63e3746150b2e7.tar.gz
as-content-rating: Add missing OARS → CSM mappings to fix round trips
Currently, it’s not possible to do a round trip from a CSM age to a set of OARS ratings and back to a CSM age without the age changing; this is because there are no mappings for ages 16 and 17. Fix that by adding them. There is no child psychology knowledge behind the choices of ages here: they were chosen purely to fit in with the existing ratings and to fix round trips. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://github.com/hughsie/appstream-glib/issues/280
-rw-r--r--libappstream-glib/as-content-rating.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libappstream-glib/as-content-rating.c b/libappstream-glib/as-content-rating.c
index 2a4620b..9b7489b 100644
--- a/libappstream-glib/as-content-rating.c
+++ b/libappstream-glib/as-content-rating.c
@@ -245,9 +245,11 @@ as_content_rating_id_value_to_csm_age (const gchar *id, AsContentRatingValue val
{ "violence-sexual", AS_CONTENT_RATING_VALUE_INTENSE, 18 },
{ "drugs-alcohol", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "drugs-alcohol", AS_CONTENT_RATING_VALUE_MILD, 11 },
+ { "drugs-alcohol", AS_CONTENT_RATING_VALUE_INTENSE, 16 },
{ "drugs-alcohol", AS_CONTENT_RATING_VALUE_MODERATE, 13 },
{ "drugs-narcotics", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "drugs-narcotics", AS_CONTENT_RATING_VALUE_MILD, 12 },
+ { "drugs-narcotics", AS_CONTENT_RATING_VALUE_INTENSE, 17 },
{ "drugs-narcotics", AS_CONTENT_RATING_VALUE_MODERATE, 14 },
{ "drugs-tobacco", AS_CONTENT_RATING_VALUE_NONE, 0 },
{ "drugs-tobacco", AS_CONTENT_RATING_VALUE_MILD, 10 },