diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-06-07 20:40:23 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-06-07 20:40:23 +0300 |
commit | c733639969a50c7db826593d2fc7f8e7899418e2 (patch) | |
tree | e02db7f6e1543e6a4a11303debd41561848fa222 /tools/process-motion-timecodes.py | |
parent | 62bd99516804b2e204f533de9346137aa9063131 (diff) |
tools/process-motion-timecodes.py: don't proceed if no valid timecodes left after filtering
Diffstat (limited to 'tools/process-motion-timecodes.py')
-rwxr-xr-x | tools/process-motion-timecodes.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/process-motion-timecodes.py b/tools/process-motion-timecodes.py index 70c990d..ba4ee26 100755 --- a/tools/process-motion-timecodes.py +++ b/tools/process-motion-timecodes.py @@ -48,6 +48,8 @@ if __name__ == '__main__': # sort out invalid fragments (dvr-scan returns them sometimes, idk why...) timecodes = list(filter(lambda f: f[0] < f[1], timecodes)) + if not timecodes: + raise ValueError('no valid timecodes') file_dt = filename_to_datetime(arg.source_filename) |