Debug
This commit is contained in:
@@ -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}.*")
|
||||||
|
|||||||
Reference in New Issue
Block a user