From 2a80702267fefa1366ddbe5b33b585449f041120 Mon Sep 17 00:00:00 2001 From: bashrc Date: Mon, 13 Apr 2026 15:51:57 +0100 Subject: [PATCH] Alternative podcast duration field --- newswire.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/newswire.py b/newswire.py index 00ed36c1d..f6429db61 100644 --- a/newswire.py +++ b/newswire.py @@ -664,6 +664,17 @@ def xml_podcast_to_dict(base_dir: str, xml_item: str, xml_str: str) -> {}: podcast_properties[pod_key] = pod_entry ctr += 1 + # itunes:duration rather than podcast:duration + if 'duration' not in podcast_properties: + if '' in duration: + duration = duration.split('>')[1] + if '<' in duration: + duration = duration.split('<')[0] + if duration.isdigit(): + podcast_properties['duration'] = duration + # get the image for the podcast, if it exists podcast_episode_image = None episode_image_tags = ['