Skip to content

Commit

Permalink
Initial code changes for review, issue beetbox#185
Browse files Browse the repository at this point in the history
  • Loading branch information
dixoncx committed Jun 18, 2016
1 parent 2669b35 commit dc0c011
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions beets/config_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import:
group_albums: no
pretend: false
search_ids: []
duplicate_action: ask

clutter: ["Thumbs.DB", ".DS_Store"]
ignore: [".*", "*~", "System Volume Information", "lost+found"]
Expand Down
10 changes: 9 additions & 1 deletion beets/ui/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,11 +824,19 @@ def resolve_duplicate(self, task, found_duplicates):
log.warn(u"This {0} is already in the library!",
(u"album" if task.is_album else u"item"))

# If set, get the action to follow from config.
sel = config['import']['duplicate_action'].as_choice({
u'skip': u's',
u'keep': u'k',
u'remove': u'r',
u'ask': None,
})

if config['import']['quiet']:
# In quiet mode, don't prompt -- just skip.
log.info(u'Skipping.')
sel = u's'
else:
elif sel is None:
# Print some detail about the existing and new items so the
# user can make an informed decision.
for duplicate in found_duplicates:
Expand Down

0 comments on commit dc0c011

Please sign in to comment.