Skip to content

The only downloader you need. 下载器的集大成者。

fix: 修复引入 Winloop 后子进程执行失败的问题

XiaoYouChR22843b5a46f9
diff --git a/features/ffmpeg_pack/config.py b/features/ffmpeg_pack/config.py
index fd4034e8..61194374 100644
--- a/features/ffmpeg_pack/config.py
+++ b/features/ffmpeg_pack/config.py
@@ -63,6 +63,7 @@ async def queryFFmpegRuntime() -> dict[str, str]:
process = await asyncio.create_subprocess_exec(
ffmpegPath,
"-version",
+ stdin=asyncio.subprocess.DEVNULL,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.DEVNULL,
)
diff --git a/features/ffmpeg_pack/task.py b/features/ffmpeg_pack/task.py
index 11587553..7cab374a 100644
--- a/features/ffmpeg_pack/task.py
+++ b/features/ffmpeg_pack/task.py
@@ -151,6 +151,7 @@ class FFmpegWorker(Worker):
"-of",
"default=noprint_wrappers=1:nokey=1",
path,
+ stdin=asyncio.subprocess.DEVNULL,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
@@ -215,6 +216,7 @@ class FFmpegWorker(Worker):
"-c",
"copy",
self.stage.resolvePath,
+ stdin=asyncio.subprocess.DEVNULL,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.DEVNULL,
)
diff --git a/features/m3u8_pack/config.py b/features/m3u8_pack/config.py
index a36a1ac6..4d6012d0 100644
--- a/features/m3u8_pack/config.py
+++ b/features/m3u8_pack/config.py
@@ -84,6 +84,7 @@ async def queryM3U8Runtime() -> dict[str, str]:
process = await asyncio.create_subprocess_exec(
downloaderPath,
"--version",
+ stdin=asyncio.subprocess.DEVNULL,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
)
diff --git a/features/m3u8_pack/task.py b/features/m3u8_pack/task.py
index 24a73038..0f7f23e1 100644
--- a/features/m3u8_pack/task.py
+++ b/features/m3u8_pack/task.py
@@ -526,6 +526,7 @@ class M3U8Worker(Worker):
downloaderPath,
*args,
cwd=str(Path(downloaderPath).parent),
+ stdin=asyncio.subprocess.DEVNULL,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT,
)