[ie/TokFMPodcast] remove useless loop over 1 ext

This commit is contained in:
LN Liberda
2025-04-05 16:43:33 +02:00
parent 12bc9ed90b
commit 43bad730df
+5 -7
View File
@@ -165,17 +165,15 @@ class TokFMPodcastIE(InfoExtractor):
metadata = metadata[0] metadata = metadata[0]
formats = [] formats = []
for ext in ('mp3',):
url_data = self._download_json( url_data = self._download_json(
f'https://api.podcast.radioagora.pl/api4/getSongUrl?podcast_id={media_id}&device_id={uuid.uuid4()}&ppre=false&audio={ext}', f'https://api.podcast.radioagora.pl/api4/getSongUrl?podcast_id={media_id}&device_id={uuid.uuid4()}&ppre=false&audio=mp3',
media_id, f'Downloading podcast {ext} URL') media_id, 'Downloading podcast mp3 URL')
# prevents inserting the mp3 (default) multiple times if 'link_ssl' in url_data:
if 'link_ssl' in url_data and f'.{ext}' in url_data['link_ssl']:
formats.append({ formats.append({
'url': url_data['link_ssl'], 'url': url_data['link_ssl'],
'ext': ext, 'ext': 'mp3',
'vcodec': 'none', 'vcodec': 'none',
'acodec': ext, 'acodec': 'mp3',
}) })
return { return {