--context: ignore some options (like --armed)
This commit is contained in:
parent
55646352ec
commit
7714a8590a
2 changed files with 10 additions and 9 deletions
3
aux.py
3
aux.py
|
@ -42,7 +42,7 @@ def _serialize(d):
|
||||||
else:
|
else:
|
||||||
return str(d)
|
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.
|
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.
|
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)
|
main.print("syncing context (from .over-video)", prefix.start)
|
||||||
|
|
||||||
for option in options.values():
|
for option in options.values():
|
||||||
|
if option.name not in ignore:
|
||||||
if option.name in overrides and option.source is not "cmdline":
|
if option.name in overrides and option.source is not "cmdline":
|
||||||
override = overrides[option.name]
|
override = overrides[option.name]
|
||||||
main.print("using §B--§g{:s}§/ = §m{:s}§/".format(option.name, str(override)))
|
main.print("using §B--§g{:s}§/ = §m{:s}§/".format(option.name, str(override)))
|
||||||
|
|
|
@ -68,7 +68,7 @@ if __name__ == '__main__':
|
||||||
files.container = 'mkv'
|
files.container = 'mkv'
|
||||||
|
|
||||||
if main.cfg.context:
|
if main.cfg.context:
|
||||||
update_cfg_context(main)
|
update_cfg_context(main, ["armed", "probe", "dump-commands"])
|
||||||
|
|
||||||
if main.cfg.audio in ('copy', 'drop'):
|
if main.cfg.audio in ('copy', 'drop'):
|
||||||
audio_words.append('§c%s§/' %(main.cfg.audio))
|
audio_words.append('§c%s§/' %(main.cfg.audio))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue