refactor: split modules and harden scraping workflows

This commit is contained in:
ShukeBta
2026-06-24 11:59:18 +08:00
parent efca3cbe69
commit 192f35d9fa
470 changed files with 47957 additions and 33839 deletions
+14 -1
View File
@@ -414,7 +414,9 @@ func CheckFFmpegStatus(ffprobePath, ffmpegPath string) map[string]interface{} {
// 提取版本信息(第一行)
lines := bytes.Split(out, []byte("\n"))
if len(lines) > 0 {
status["ffprobe_version"] = string(bytes.TrimSpace(lines[0]))
version := string(bytes.TrimSpace(lines[0]))
status["ffprobe_version"] = version
status["ffprobe_security"] = EvaluateFFmpegSecurity(version)
}
}
}
@@ -424,6 +426,17 @@ func CheckFFmpegStatus(ffprobePath, ffmpegPath string) map[string]interface{} {
if _, err := os.Stat(ffmpegPath); err == nil {
status["ffmpeg_installed"] = true
status["ffmpeg_path"] = ffmpegPath
cmd := exec.Command(ffmpegPath, "-version")
out, err := cmd.Output()
if err == nil {
lines := bytes.Split(out, []byte("\n"))
if len(lines) > 0 {
version := string(bytes.TrimSpace(lines[0]))
status["ffmpeg_version"] = version
status["ffmpeg_security"] = EvaluateFFmpegSecurity(version)
}
}
}
}