feat(core): 优化媒体文件扫描和处理功能
- 添加跳过ffprobe相关文件的逻辑,避免处理临时释放文件 - 修复图片处理中的变量引用错误 - 实现大文件指纹复用机制,避免重复全量读取计算MD5 - 新增文件头尾采样指纹算法,提升大文件处理性能 - 重构ffprobe内嵌资源管理,支持多平台自动选择对应版本 - 添加媒体信息数据库的指纹索引和去向跟踪功能 - 优化程序启动流程,失败时跳过媒体整理但保留图片处理 - 更新文档说明多平台ffprobe支持和构建要求
This commit is contained in:
+6
-2
@@ -24,9 +24,12 @@ func FFprobeExePath() string {
|
||||
return "." + string(os.PathSeparator) + FFprobeExeName
|
||||
}
|
||||
|
||||
// ReleaseFFprobe 释放内嵌的ffprobe到当前目录
|
||||
// ReleaseFFprobe 释放内嵌的ffprobe到当前目录(按当前系统自动选择对应版本)
|
||||
func ReleaseFFprobe() error {
|
||||
return WriteByteArraysToFile(vars.VideoDecodeToolWin64, FFprobeExeName)
|
||||
if len(vars.VideoDecodeTool) == 0 {
|
||||
return fmt.Errorf("当前系统没有内嵌的ffprobe")
|
||||
}
|
||||
return WriteByteArraysToFile(vars.VideoDecodeTool, FFprobeExeName)
|
||||
}
|
||||
|
||||
// RemoveFFprobe 删除当前目录下的ffprobe
|
||||
@@ -170,6 +173,7 @@ func DoMoveFileToDir(filePathList []string, videoDirPath string) {
|
||||
pathSeparator := string(os.PathSeparator)
|
||||
for _, videoFilePath := range filePathList {
|
||||
moveFileToDir(videoFilePath, videoDirPath+pathSeparator)
|
||||
vars.GlobalPath2DestDirMap[videoFilePath] = videoDirPath // 记录去向
|
||||
count = count + 1
|
||||
bar.PrintBar(CalcPercentage(count, total))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user