Browse Source

调整细节

Signed-off-by: allan716 <[email protected]>
allan716 4 years ago
parent
commit
53cc7974c6

+ 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.设置 数据组