From dd5684ae3cc8e811c76c7870209fd8adf0171464 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 13 Jan 2022 12:37:08 +0000 Subject: [PATCH] Podcast image can be global to the feed, not per item --- newswire.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/newswire.py b/newswire.py index c611d07db..04c3d0ccf 100644 --- a/newswire.py +++ b/newswire.py @@ -379,13 +379,13 @@ def _xml2str_to_hashtag_categories(base_dir: str, xml_str: str, False, force) -def xml_podcast_to_dict(xml_str: str) -> {}: +def xml_podcast_to_dict(xml_item: str, xml_str: str) -> {}: """podcasting extensions for RSS feeds See https://github.com/Podcastindex-org/podcast-namespace/ blob/main/docs/1.0.md """ - if ' {}: "trailers": [] } - pod_lines = xml_str.split('' not in pod_line: @@ -448,9 +448,13 @@ def xml_podcast_to_dict(xml_str: str) -> {}: podcast_episode_image = None episode_image_tags = [' {}: if podcast_episode_image: podcast_properties['image'] = podcast_episode_image - if 'Y' in xml_str or \ - 'T' in xml_str or \ - '1' in xml_str: + if 'Y' in xml_item or \ + 'T' in xml_item or \ + '1' in xml_item: podcast_properties['explicit'] = True else: podcast_properties['explicit'] = False else: - if '