feat: 移动文件完成后清空 scan_log 续传记录

This commit is contained in:
2025-08-01 21:06:38 +08:00
parent 2e01f6c3c9
commit 2073596fdd
2 changed files with 14 additions and 0 deletions
+9
View File
@@ -189,6 +189,15 @@ func (s *Store) SaveScanLogs(entries []ScanLog) error {
return sess.Commit()
}
// ClearScanLog 清空全部续传记录。移动完成后调用。
func (s *Store) ClearScanLog() error {
if s == nil || s.engine == nil {
return nil
}
_, err := s.engine.Delete(new(ScanLog))
return err
}
// ============================ 媒体记录的新增/更新 ============================
// SaveMedia 保存/更新一条媒体记录:按 MD5 找,有就更新,没有就新增。