[totem-pl-parser] podcast: Use xml_parser_get_node_value() for atom entries
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] podcast: Use xml_parser_get_node_value() for atom entries
- Date: Tue, 23 Feb 2021 17:07:28 +0000 (UTC)
commit 3dfbc563b8ce22967d2d71dd4a5bfebb135b1746
Author: crvi <crvisqr gmail com>
Date: Wed Sep 30 22:05:18 2020 +0530
podcast: Use xml_parser_get_node_value() for atom entries
plparse/totem-pl-parser-podcast.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/plparse/totem-pl-parser-podcast.c b/plparse/totem-pl-parser-podcast.c
index 8f73484..2599129 100644
--- a/plparse/totem-pl-parser-podcast.c
+++ b/plparse/totem-pl-parser-podcast.c
@@ -451,17 +451,11 @@ 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) {
- xml_node_t *child;
-
- for (child = node->child; child != NULL; child = child->next) {
- if (child->name == NULL)
- continue;
+ const char *tmp;
- if (g_ascii_strcasecmp (child->name, "name") == 0) {
- author = child->data;
- break;
- }
- }
+ tmp = xml_parser_get_node_value (node, "name");
+ if (tmp != NULL)
+ author = tmp;
} 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]