skip duplicate prompt in quiet mode

In quiet mode, duplicates are skipped. We can add a new config option if people
really want to customize this.
This commit is contained in:
Adrian Sampson 2012-03-20 13:02:02 -07:00
parent ced4e1ace8
commit 71762375c9

View file

@ -570,10 +570,17 @@ def resolve_duplicate(task, config):
"""
log.warn("This %s is already in the library!" %
("album" if task.is_album else "item"))
sel = ui.input_options(
('Skip new', 'Keep both', 'Remove old'),
color=config.color
)
if config.quiet:
# In quiet mode, don't prompt -- just skip.
log.info('Skipping.')
sel = 's'
else:
sel = ui.input_options(
('Skip new', 'Keep both', 'Remove old'),
color=config.color
)
if sel == 's':
# Skip new.
task.set_choice(importer.action.SKIP)