[totem-pl-parser/wip/hadess/atom-podcast-fixes: 1/4] podcast: Parse author in Atom



commit 738e5f78833921d51e538658be523d43550aef0c
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 11 03:03:48 2019 +0100

    podcast: Parse author in Atom

 plparse/totem-pl-parser-podcast.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/plparse/totem-pl-parser-podcast.c b/plparse/totem-pl-parser-podcast.c
index 08e229f..64b825a 100644
--- a/plparse/totem-pl-parser-podcast.c
+++ b/plparse/totem-pl-parser-podcast.c
@@ -419,7 +419,17 @@ parse_atom_entry (TotemPlParser *parser, xml_node_t *parent)
                if (g_ascii_strcasecmp (node->name, "title") == 0) {
                        title = node->data;
                } else if (g_ascii_strcasecmp (node->name, "author") == 0) {
-                       //FIXME
+                       xml_node_t *child;
+
+                       for (child = node->child; child != NULL; child = child->next) {
+                               if (child->name == NULL)
+                                       continue;
+
+                               if (g_ascii_strcasecmp (child->name, "name") == 0) {
+                                       author = child->data;
+                                       break;
+                               }
+                       }
                } else if (g_ascii_strcasecmp (node->name, "link") == 0) {
                        const char *rel;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]