소스 검색

调整细节

Signed-off-by: allan716 <[email protected]>
allan716 4 년 전
부모
커밋
53cc7974c6
2개의 변경된 파일5개의 추가작업 그리고 9개의 파일을 삭제
  1. 4 8
      internal/pkg/sub_timeline_fixer/fixer.go
  2. 1 1
      internal/pkg/sub_timeline_fixer/static_line.go

+ 4 - 8
internal/pkg/sub_timeline_fixer/fixer.go

@@ -151,23 +151,19 @@ func GetOffsetTime(infoBase, infoSrc *subparser.FileInfo, staticLineFPath string
 
 			baseTimeStart, err := time.Parse(timeFormat, infoBase.DialoguesEx[tmpBaseIndex].StartTime)
 			if err != nil {
-				println("baseTimeStart", err)
-				continue
+				return 0, err
 			}
 			baseTimeEnd, err := time.Parse(timeFormat, infoBase.DialoguesEx[tmpBaseIndex].EndTime)
 			if err != nil {
-				println("baseTimeEnd", err)
-				continue
+				return 0, err
 			}
 			srtTimeStart, err := time.Parse(timeFormat, infoSrc.DialoguesEx[tmpSrcIndex].StartTime)
 			if err != nil {
-				println("srtTimeStart", err)
-				continue
+				return 0, err
 			}
 			srtTimeEnd, err := time.Parse(timeFormat, infoSrc.DialoguesEx[tmpSrcIndex].EndTime)
 			if err != nil {
-				println("srtTimeEnd", err)
-				continue
+				return 0, err
 			}
 
 			TimeDiffStart := baseTimeStart.Sub(srtTimeStart)

+ 1 - 1
internal/pkg/sub_timeline_fixer/static_line.go

@@ -15,7 +15,7 @@ func SaveStaticLine(saveFPath string, infoBaseName, infoSrcName string,
 	// 2.设置 标题 和 子标题
 	bar.SetGlobalOptions(charts.WithTitleOpts(opts.Title{
 		Title:    infoBaseName + " <-->" + infoSrcName,
-		Subtitle: fmt.Sprintf("One Dialogue Start-End(Blue and Green) Base -> Src Start (newLen / orgLen = %f) OldMean: %f OldSD: %f -- NewMean: %f NewSD: %f", per, oldMean, OldSd, NewMean, NewSd),
+		Subtitle: fmt.Sprintf("One Dialogue Start-End(Blue and Green) Base -> Src Start (newLen / orgLen = %f) \r\nOldMean: %f OldSD: %f -- NewMean: %f NewSD: %f", per, oldMean, OldSd, NewMean, NewSd),
 	}))
 
 	// 3.设置 数据组