Skip to content

Commit

Permalink
修复对白数量差异判断的bug
Browse files Browse the repository at this point in the history
Signed-off-by: allan716 <525223688@qq.com>
  • Loading branch information
allanpk716 committed Jul 14, 2022
1 parent 9a740a7 commit da2e318
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/logic/sub_timeline_fixer/SubTimelineFixerHelperEx.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (s SubTimelineFixerHelperEx) IsMatchBySubFile(ffmpegInfo *ffmpeg_helper.FFM
}
// ---------------------------------------------------------------------------------------
// 两个对比字幕的对白数量不能超过 10%
minRage := float64(len(infoBase.Dialogues)) * 0.1
minRage := float64(len(infoBase.Dialogues)) * config.DialoguesDifferencePercentage
if math.Abs(float64(len(srcBase.Dialogues)-len(infoBase.Dialogues))) > minRage {
return false, matchResult, nil
}
Expand Down Expand Up @@ -385,4 +385,5 @@ type MathResult struct {
AudioCompareOffsetTime float64 // 音频的对比偏移量
SubCompareScore float64 // 字幕的对比分数
SubCompareOffsetTime float64 // 字幕的对比偏移量

}

0 comments on commit da2e318

Please sign in to comment.