[libgdata/libgdata-0-5] [youtube] Fix parsing of video ratings
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/libgdata-0-5] [youtube] Fix parsing of video ratings
- Date: Sun, 2 May 2010 15:23:26 +0000 (UTC)
commit 316aa761da5fdc12b69d0d5ad880417dcbbb9411
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun May 2 16:19:11 2010 +0100
[youtube] Fix parsing of video ratings
With the introduction of the new yt:rating element, the old code for parsing
gd:rating clashes with it. The introduction of a namespace check fixes this.
Closes: bgo#617296
gdata/services/youtube/gdata-youtube-video.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdata/services/youtube/gdata-youtube-video.c b/gdata/services/youtube/gdata-youtube-video.c
index 98d1855..80e78f3 100644
--- a/gdata/services/youtube/gdata-youtube-video.c
+++ b/gdata/services/youtube/gdata-youtube-video.c
@@ -632,7 +632,8 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
}
self->priv->media_group = group;
- } else if (xmlStrcmp (node->name, (xmlChar*) "rating") == 0) {
+ } else if (node->ns != NULL && xmlStrcmp (node->ns->href, (xmlChar*) "http://schemas.google.com/g/2005") == 0 &&
+ xmlStrcmp (node->name, (xmlChar*) "rating") == 0) {
/* gd:rating */
xmlChar *min, *max, *num_raters, *average;
guint num_raters_uint;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]