[totem-pl-parser] Fix parsing of Guardian Podcasts
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] Fix parsing of Guardian Podcasts
- Date: Mon, 8 Feb 2010 18:24:52 +0000 (UTC)
commit 6fbda63e1126c58943b78729e3a9934f031396da
Author: Bastien Nocera <hadess hadess net>
Date: Mon Feb 8 18:23:49 2010 +0000
Fix parsing of Guardian Podcasts
As available from:
http://www.guardian.co.uk/media/series/media-talk-usa/rss
plparse/totem-pl-parser-podcast.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser-podcast.c b/plparse/totem-pl-parser-podcast.c
index 4480b3d..6b91894 100644
--- a/plparse/totem-pl-parser-podcast.c
+++ b/plparse/totem-pl-parser-podcast.c
@@ -130,6 +130,27 @@ parse_rss_item (TotemPlParser *parser, xml_node_t *parent)
duration = node->data;
} else if (g_ascii_strcasecmp (node->name, "length") == 0) {
filesize = node->data;
+ } else if (g_ascii_strcasecmp (node->name, "media:content") == 0) {
+ const char *tmp;
+
+ tmp = xml_parser_get_property (node, "type");
+ if (tmp != NULL &&
+ g_str_has_prefix (tmp, "audio/") == FALSE)
+ continue;
+
+ tmp = xml_parser_get_property (node, "url");
+ if (tmp != NULL)
+ uri = tmp;
+ else
+ continue;
+
+ tmp = xml_parser_get_property (node, "fileSize");
+ if (tmp != NULL)
+ filesize = tmp;
+
+ tmp = xml_parser_get_property (node, "duration");
+ if (tmp != NULL)
+ duration = tmp;
} else if (g_ascii_strcasecmp (node->name, "enclosure") == 0) {
const char *tmp;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]