mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-05 21:06:38 +08:00
refactor: split modules and harden scraping workflows
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user