[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
+10 -12
View File
@@ -165,18 +165,16 @@ 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=mp3',
f'https://api.podcast.radioagora.pl/api4/getSongUrl?podcast_id={media_id}&device_id={uuid.uuid4()}&ppre=false&audio={ext}', media_id, 'Downloading podcast mp3 URL')
media_id, f'Downloading podcast {ext} URL') if 'link_ssl' in url_data:
# prevents inserting the mp3 (default) multiple times formats.append({
if 'link_ssl' in url_data and f'.{ext}' in url_data['link_ssl']: 'url': url_data['link_ssl'],
formats.append({ 'ext': 'mp3',
'url': url_data['link_ssl'], 'vcodec': 'none',
'ext': ext, 'acodec': 'mp3',
'vcodec': 'none', })
'acodec': ext,
})
return { return {
'id': media_id, 'id': media_id,