mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 13:00:45 +08:00
feat: 路径约定体系 & 自优化管道落地
This commit is contained in:
parent
08df5d580a
commit
df30b5902f
37 changed files with 239 additions and 324 deletions
|
|
@ -54,7 +54,7 @@ def _sniff_image_mime(data: bytes) -> str | None:
|
|||
|
||||
def _ffprobe_exists() -> bool:
|
||||
try:
|
||||
p = subprocess.run(["ffprobe", "-version"], capture_output=True, text=True, timeout=3)
|
||||
p = subprocess.run(["ffprobe", "-version"], capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=3)
|
||||
return p.returncode == 0
|
||||
except Exception:
|
||||
return False
|
||||
|
|
@ -115,6 +115,8 @@ def _ffprobe_video_meta(path: Path) -> dict[str, Any]:
|
|||
["ffprobe", "-v", "error", "-print_format", "json", "-show_format", "-show_streams", str(path)],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
timeout=8,
|
||||
)
|
||||
if p.returncode != 0:
|
||||
|
|
|
|||
|
|
@ -81,5 +81,7 @@ def run_cc_mini_cli(
|
|||
env=merged,
|
||||
check=False,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
**kwargs,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue