--context: ignore some options (like --armed)

This commit is contained in:
Martinez 2016-03-16 11:47:17 +01:00
parent 55646352ec
commit 7714a8590a
2 changed files with 10 additions and 9 deletions

3
aux.py
View file

@ -42,7 +42,7 @@ def _serialize(d):
else:
return str(d)
def update_cfg_context(main):
def update_cfg_context(main, ignore=[]):
"""
All main.options that are sourced from either the cfg file or defaults get overridden by those in .over-video.
Those that are from command line get saved into .over-video.
@ -86,6 +86,7 @@ def update_cfg_context(main):
main.print("syncing context (from .over-video)", prefix.start)
for option in options.values():
if option.name not in ignore:
if option.name in overrides and option.source is not "cmdline":
override = overrides[option.name]
main.print("using §B--§g{:s}§/ = §m{:s}§/".format(option.name, str(override)))

View file

@ -68,7 +68,7 @@ if __name__ == '__main__':
files.container = 'mkv'
if main.cfg.context:
update_cfg_context(main)
update_cfg_context(main, ["armed", "probe", "dump-commands"])
if main.cfg.audio in ('copy', 'drop'):
audio_words.append('§c%s§/' %(main.cfg.audio))