Skip to content

Commit 86b7c28

Browse files
committed
ffmpeg_editlist: alias 'stop' command as 'break', 'lunch', 'exercise'
- And will be printed with --show-schedule
1 parent 9015f9f commit 86b7c28

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

ffmpeg_editlist.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,13 @@ def main(argv=sys.argv[1:]):
389389
if 'begin' in command:
390390
command['start'] = command['begin']
391391
del command['begin']
392-
if 'end' in command:
393-
command['stop'] = command['end']
394-
del command['end']
392+
for stop_alias in ['end', 'break', 'lunch', 'exercise']:
393+
if stop_alias in command:
394+
command['stop'] = command[stop_alias]
395+
del command[stop_alias]
396+
break
397+
else:
398+
stop_alias = 'stop'
395399
#
396400

397401
# Is this a command to cover a part of the video?
@@ -420,7 +424,7 @@ def main(argv=sys.argv[1:]):
420424
# End command: process this segment and all queued commands
421425
elif isinstance(command, dict) and 'stop' in command:
422426
stop = command['stop']
423-
schedule(stop, "STOP")
427+
schedule(stop, stop_alias.upper())
424428
# Continue below to process this segment
425429
# Is this a TOC entry?
426430
# If it's a dict, it is a table of contents entry that will be

0 commit comments

Comments
 (0)