summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrvi <crvisqr@gmail.com>2021-03-03 11:51:35 +0530
committercrvi <crvisqr@gmail.com>2021-03-03 12:01:18 +0530
commita1da6d9cd030e2fad6d6b0ac3a363ea074478bca (patch)
tree50c276ca5972959e2c1c4a472873ec05fcc1c742
parent19b368a389353668ce69542431504dc6359c2ff9 (diff)
downloadtotem-pl-parser-a1da6d9cd030e2fad6d6b0ac3a363ea074478bca.tar.gz
podcast: Add content type metadata field for feeds
This should be useful for apps which need the feed content type. This is currently required for OPML feeds, since they need to be handled differently by the apps than other feeds.
-rw-r--r--plparse/totem-pl-parser-podcast.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plparse/totem-pl-parser-podcast.c b/plparse/totem-pl-parser-podcast.c
index d1ba4e1..0877f04 100644
--- a/plparse/totem-pl-parser-podcast.c
+++ b/plparse/totem-pl-parser-podcast.c
@@ -398,6 +398,7 @@ parse_rss_items (TotemPlParser *parser, const char *uri, xml_node_t *parent)
TOTEM_PL_PARSER_FIELD_IMAGE_URI, img,
TOTEM_PL_PARSER_FIELD_CONTACT, contact,
TOTEM_PL_PARSER_FIELD_CONTENT_RATING, get_content_rating (explicit),
+ TOTEM_PL_PARSER_FIELD_CONTENT_TYPE, "application/rss+xml",
NULL);
for (node = parent->child; node != NULL; node = node->next) {
@@ -680,6 +681,7 @@ parse_atom_entries (TotemPlParser *parser, const char *uri, xml_node_t *parent)
TOTEM_PL_PARSER_FIELD_AUTHOR, author,
TOTEM_PL_PARSER_FIELD_PUB_DATE, pub_date,
TOTEM_PL_PARSER_FIELD_IMAGE_URI, img,
+ TOTEM_PL_PARSER_FIELD_CONTENT_TYPE, "application/atom+xml",
NULL);
started = TRUE;
}
@@ -921,6 +923,7 @@ parse_opml_head_body (TotemPlParser *parser, const char *uri, xml_node_t *parent
totem_pl_parser_add_uri (parser,
TOTEM_PL_PARSER_FIELD_IS_PLAYLIST, TRUE,
TOTEM_PL_PARSER_FIELD_URI, uri,
+ TOTEM_PL_PARSER_FIELD_CONTENT_TYPE, "text/x-opml+xml",
NULL);
started = TRUE;
}