浏览代码

fix: negative total durations should not be possible

main
Rob Hallam 2 个月前
父节点
当前提交
15ca7cb6fa
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      pipeline/adjusters.py

+ 4
- 0
pipeline/adjusters.py 查看文件

@@ -55,6 +55,10 @@ class TargetTimeAdjuster(Adjuster):
target_time_max = time + (time * margin / 100)
target_time_min = time - (time * margin / 100)

# ensure we don't have negative times
if type(target_time_min) is float and target_time_min < 0:
target_time_min = 0.0

return (target_time_min, target_time_max)

def _features_total_time(self, features: list) -> float:


正在加载...
取消
保存