This commit is contained in:
afk
2026-07-16 19:21:47 +02:00
parent f7c2e014f9
commit 13f8c962e3
+8 -7
View File
@@ -464,17 +464,18 @@ async def process_radio_track(video_link, video_id, title):
dl_cmd = [ dl_cmd = [
"yt-dlp", "yt-dlp",
"--extract-audio", "--extract-audio",
"--output", "--output", f"{base_filepath}.%(ext)s",
f"{base_filepath}.%(ext)s", video_link
video_link,
] ]
process = await asyncio.create_subprocess_exec( process = await asyncio.create_subprocess_exec(
*dl_cmd, *dl_cmd,
stdout=asyncio.subprocess.DEVNULL, stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.PIPE
) )
await process.communicate() stdout, stderr = await process.communicate()
if process.returncode != 0:
print(f"❌ yt-dlp crashed! Error:\n{stderr.decode().strip()}")
return
# Check for the file using glob # Check for the file using glob
downloaded_files = glob.glob(f"{base_filepath}.*") downloaded_files = glob.glob(f"{base_filepath}.*")