瀏覽代碼

调整执行的逻辑

Signed-off-by: allan716 <[email protected]>
allan716 3 年之前
父節點
當前提交
a6d618ff67
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      internal/pkg/video_scan_and_refresh_helper/video_scan_and_refresh_helper.go

+ 8 - 8
internal/pkg/video_scan_and_refresh_helper/video_scan_and_refresh_helper.go

@@ -329,14 +329,7 @@ func (v *VideoScanAndRefreshHelper) scanLowVideoSubInfo(scanVideoResult *ScanVid
 			v.log.Warningln("scanLowVideoSubInfo.GetMixMediaInfo", videoFPath, err)
 			return false
 		}
-
-		// 使用本程序的 hash 的算法,得到视频的唯一 ID
-		fileHash, err := sub_file_hash.Calculate(videoFPath)
-		if err != nil {
-			v.log.Warningln("scanLowVideoSubInfo.ComputeFileHash", videoFPath, err)
-			return false
-		}
-
+		// 这个视频有对应的文中字幕
 		bFoundChineseSub, _, chineseSubFitVideoNameFullPathList, err := movie_helper.MovieHasChineseSub(v.log, videoFPath)
 		if err != nil {
 			v.log.Warningln("scanLowVideoSubInfo.MovieHasChineseSub", videoFPath, err)
@@ -348,6 +341,13 @@ func (v *VideoScanAndRefreshHelper) scanLowVideoSubInfo(scanVideoResult *ScanVid
 			return false
 		}
 
+		// 使用本程序的 hash 的算法,得到视频的唯一 ID
+		fileHash, err := sub_file_hash.Calculate(videoFPath)
+		if err != nil {
+			v.log.Warningln("scanLowVideoSubInfo.ComputeFileHash", videoFPath, err)
+			return false
+		}
+
 		v.log.Infoln("--------------------------------------------------------------------------------")
 		v.log.Infoln("scanLowVideoSubInfo.MovieHasChineseSub", videoFPath)
 		for index, orgSubFPath := range chineseSubFitVideoNameFullPathList {