From 2a609b2143cc87b6810b107f9f6ee5744896774b Mon Sep 17 00:00:00 2001 From: pierre geeraert Date: Thu, 2 Jul 2026 21:07:38 +0100 Subject: [PATCH] only fetch enabled data --- django_code/apps/podcast_aggregator/utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/django_code/apps/podcast_aggregator/utils.py b/django_code/apps/podcast_aggregator/utils.py index 1941a80..26c41de 100644 --- a/django_code/apps/podcast_aggregator/utils.py +++ b/django_code/apps/podcast_aggregator/utils.py @@ -65,12 +65,10 @@ def podcasts(): #clear all expired messages before telegram.clear_expired_messages() - podcasts = podcastData.objects.all() + podcasts = podcastData.objects.filter(enabled=True) for podcast in podcasts: url = podcast.podcast_url - #url = "https://feeds.audiomeans.fr/feed/44f6a116-20a6-44c4-98c4-b3e1bdd46dce.xml" - #url_bbc = "https://podcast.voice.api.bbci.co.uk/rss/audio/p002vsmz?api_key=Wbek5zSqxz0Hk1blo5IBqbd9SCWIfNbT" - + today_podcast = rss_to_dict(url) print(today_podcast) file= pretty_filename(today_podcast[1],'mp3')