[totem-pl-parser/wip/hadess/dont-recurse-videosite: 9/10] podcast: Do not check for videosite links unless requested




commit 9c485195be2fe0431eec8decc8214a6721ad5ad3
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 4 16:45:29 2021 +0100

    podcast: Do not check for videosite links unless requested
    
    We don't need to check whether links in RSS feeds are videosite links
    unless the application requested that we do, by enabling recursive
    parsing.
    
    Closes: #25

 plparse/totem-pl-parser-podcast.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/plparse/totem-pl-parser-podcast.c b/plparse/totem-pl-parser-podcast.c
index 864681b..5f8c8f2 100644
--- a/plparse/totem-pl-parser-podcast.c
+++ b/plparse/totem-pl-parser-podcast.c
@@ -275,6 +275,7 @@ parse_rss_item (TotemPlParser *parser, xml_node_t *parent)
                        if (tmp != NULL)
                                content_type = tmp;
                } else if (g_ascii_strcasecmp (node->name, "link") == 0 &&
+                          totem_pl_parser_get_recurse (parser) &&
                           totem_pl_parser_is_videosite (node->data, FALSE) != FALSE) {
                        uri = node->data;
                } else if (g_ascii_strcasecmp (node->name, "image") == 0) {
@@ -296,6 +297,7 @@ parse_rss_item (TotemPlParser *parser, xml_node_t *parent)
 
        if (id != NULL &&
            uri == NULL &&
+           totem_pl_parser_get_recurse (parser) &&
            totem_pl_parser_is_videosite (id, FALSE) != FALSE)
                uri = id;
 


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