[totem-pl-parser/gnome-2-28] Fix parsing of Guardian Podcasts
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem-pl-parser/gnome-2-28] Fix parsing of Guardian Podcasts
- Date: Mon, 8 Feb 2010 18:24:47 +0000 (UTC)
commit d7f9cd26c383dfabd524c4b4610b0d880c7a75de
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 325fe53..e3777ab 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]