From b78fbe86c911a58e10258582cd2999ad1b185dd4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 12 Feb 2022 16:05:44 +0000 Subject: [PATCH] Use the first key --- newswire.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/newswire.py b/newswire.py index c19b8908c..d12127e98 100644 --- a/newswire.py +++ b/newswire.py @@ -514,7 +514,9 @@ def xml_podcast_to_dict(xml_item: str, xml_str: str) -> {}: podcast_properties[pod_key + 's'].append(pod_entry) appended = True if not appended: - podcast_properties[pod_key] = pod_entry + # if there are repeated keys then only use the first one + if not podcast_properties.get(pod_key): + podcast_properties[pod_key] = pod_entry ctr += 1 # get the image for the podcast, if it exists