From 41d7daabee0cec8e9dc88b56c0d8203d4ff3478a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 5 Dec 2023 17:13:26 +0000 Subject: [PATCH] Fix deduplication --- newswire.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/newswire.py b/newswire.py index 812d4aa05..fbffdcc53 100644 --- a/newswire.py +++ b/newswire.py @@ -475,9 +475,10 @@ def _get_podcast_categories(xml_item: str, xml_str: str) -> str: episode_category = \ episode_category.lower().replace(' ', '') episode_category = episode_category.replace('#', '') - if episode_category not in podcast_categories: + episode_category_hashtag = '#' + episode_category + if episode_category_hashtag not in podcast_categories: if valid_hash_tag(episode_category): - podcast_categories.append('#' + episode_category) + podcast_categories.append(episode_category_hashtag) continue if '>' in episode_category: @@ -487,9 +488,10 @@ def _get_podcast_categories(xml_item: str, xml_str: str) -> str: episode_category = \ episode_category.lower().replace(' ', '') episode_category = episode_category.replace('#', '') - if episode_category not in podcast_categories: + episode_category_hashtag = '#' + episode_category + if episode_category_hashtag not in podcast_categories: if valid_hash_tag(episode_category): - podcast_categories.append('#' + episode_category) + podcast_categories.append(episode_category_hashtag) return podcast_categories