diff options
author | crvi <crvisqr@gmail.com> | 2020-10-01 01:29:35 +0530 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-02-23 17:52:33 +0100 |
commit | 676dddf0af73c6a5c06ff39dce3b20ee5c793880 (patch) | |
tree | 1741b72d2acb868348dd4a7e147a033d446990df | |
parent | 467a94c8a275503631837e5b104b365fb5afdf7d (diff) | |
download | totem-pl-parser-676dddf0af73c6a5c06ff39dce3b20ee5c793880.tar.gz |
plparser: Add support for content rating
This is necessary as GNOME 3.38 now supports parental controls.
-rw-r--r-- | plparse/totem-pl-parser.c | 4 | ||||
-rw-r--r-- | plparse/totem-pl-parser.h | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c index c1b0600..e4db129 100644 --- a/plparse/totem-pl-parser.c +++ b/plparse/totem-pl-parser.c @@ -573,6 +573,10 @@ totem_pl_parser_class_init (TotemPlParserClass *klass) "The default audio-track to play", NULL, G_PARAM_READABLE & G_PARAM_WRITABLE); g_param_spec_pool_insert (totem_pl_parser_pspec_pool, pspec, TOTEM_TYPE_PL_PARSER); + pspec = g_param_spec_string ("content-rating", "content-rating", + "String representing the content rating for an entry", TOTEM_PL_PARSER_CONTENT_RATING_UNRATED, + G_PARAM_READABLE & G_PARAM_WRITABLE); + g_param_spec_pool_insert (totem_pl_parser_pspec_pool, pspec, TOTEM_TYPE_PL_PARSER); } static void diff --git a/plparse/totem-pl-parser.h b/plparse/totem-pl-parser.h index 6205aa6..1b10d4f 100644 --- a/plparse/totem-pl-parser.h +++ b/plparse/totem-pl-parser.h @@ -274,6 +274,20 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(TotemPlParser, g_object_unref) * track is defined as NULL. Note that the value is sent as a string. **/ #define TOTEM_PL_PARSER_FIELD_AUDIO_TRACK "audio-track" +/** + * TOTEM_PL_PARSER_FIELD_CONTENT_RATING: + * + * Metadata field for an entry's content rating. It is + * %TOTEM_PL_PARSER_CONTENT_RATING_CLEAN for clean content, + * %TOTEM_PL_PARSER_CONTENT_RATING_EXPLICIT for explicit content and + * %TOTEM_PL_PARSER_CONTENT_RATING_UNRATED for content which is not + * rated. + **/ +#define TOTEM_PL_PARSER_FIELD_CONTENT_RATING "content-rating" + +#define TOTEM_PL_PARSER_CONTENT_RATING_CLEAN "clean" +#define TOTEM_PL_PARSER_CONTENT_RATING_EXPLICIT "explicit" +#define TOTEM_PL_PARSER_CONTENT_RATING_UNRATED "unrated" /** * TotemPlParserClass: |