diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index 1e7e7a2dd..45238db8f 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -25,7 +25,8 @@ from beets.util import sorted_walk, ancestry, displayable_path from .hooks import AlbumInfo, TrackInfo, AlbumMatch, TrackMatch from .match import AutotagError from .match import tag_item, tag_album -from .match import RECOMMEND_STRONG, RECOMMEND_MEDIUM, RECOMMEND_NONE +from .match import \ + RECOMMEND_STRONG, RECOMMEND_MEDIUM, RECOMMEND_LOW, RECOMMEND_NONE # Global logger. log = logging.getLogger('beets') diff --git a/beets/autotag/match.py b/beets/autotag/match.py index 22c2c5621..63aa6450f 100644 --- a/beets/autotag/match.py +++ b/beets/autotag/match.py @@ -74,6 +74,7 @@ SD_REPLACE = [ # Recommendation constants. RECOMMEND_STRONG = 'RECOMMEND_STRONG' RECOMMEND_MEDIUM = 'RECOMMEND_MEDIUM' +RECOMMEND_LOW = 'RECOMMEND_LOW' RECOMMEND_NONE = 'RECOMMEND_NONE' # Artist signals that indicate "various artists". These are used at the @@ -348,7 +349,7 @@ def recommendation(results): elif results[1].distance - min_dist >= \ config['match']['rec_gap_thresh'].as_number(): # Gap between first two candidates is large. - rec = RECOMMEND_MEDIUM + rec = RECOMMEND_LOW else: # No conclusion. rec = RECOMMEND_NONE diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 6ab8d7973..2ae420408 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -323,6 +323,7 @@ def choose_candidate(candidates, singleton, rec, cur_artist=None, bypass_candidates = True while True: + require = rec in (autotag.RECOMMEND_NONE, autotag.RECOMMEND_LOW) # Display and choose from candidates. if not bypass_candidates: # Display list of candidates. @@ -391,6 +392,9 @@ def choose_candidate(candidates, singleton, rec, cur_artist=None, match = candidates[sel - 1] else: match = candidates[sel - 1] + # Require selection (no default). + if sel != 1: + require = True bypass_candidates = False # Show what we're about to do. @@ -410,7 +414,10 @@ def choose_candidate(candidates, singleton, rec, cur_artist=None, else: opts = ('Apply', 'More candidates', 'Skip', 'Use as-is', 'as Tracks', 'Enter search', 'enter Id', 'aBort') - sel = ui.input_options(opts) + if config['import']['confirm_partial'].get(bool) and \ + match.extra_items or match.extra_tracks: + require = True + sel = ui.input_options(opts, require=require) if sel == 'a': return match elif sel == 'm':