From 71762375c9f0922158d08ad3f3318619f0562c89 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 20 Mar 2012 13:02:02 -0700 Subject: [PATCH] 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. --- beets/ui/commands.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 865afb55e..d5d0111af 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -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)