Fix exclude option
This commit is contained in:
parent
acf1619b7a
commit
b883d9ca36
|
@ -348,6 +348,7 @@ def _compare(**kwargs):
|
|||
|
||||
@cli.command('edit')
|
||||
@add_options(_logger_options)
|
||||
@add_options(_exclude_options)
|
||||
@add_options(_filter_options)
|
||||
@click.option(
|
||||
'--key',
|
||||
|
|
|
@ -732,9 +732,16 @@ class Collection(SortMedias):
|
|||
|
||||
# Set client options
|
||||
for option, value in cli_options.items():
|
||||
if value not in (None, ()):
|
||||
if value not in (None, set()):
|
||||
for section in self.opt:
|
||||
self.opt[section][option] = value
|
||||
if option in self.opt[section]:
|
||||
if option == 'exclude':
|
||||
self.opt[section][option].union(set(value))
|
||||
elif option in ('ignore_tags', 'extensions'):
|
||||
self.opt[section][option] = set(value)
|
||||
else:
|
||||
self.opt[section][option] = value
|
||||
break
|
||||
|
||||
self.exclude = self.opt['Filters']['exclude']
|
||||
if not self.exclude:
|
||||
|
|
|
@ -66,7 +66,7 @@ class Config:
|
|||
'use_file_dates': False,
|
||||
},
|
||||
'Filters': {
|
||||
'exclude': None,
|
||||
'exclude': set(),
|
||||
'extensions': None,
|
||||
'glob': '**/*',
|
||||
'max_deep': None,
|
||||
|
|
Loading…
Reference in New Issue