now user is not only asked for a manual choice but is also able to choose another album ;)
This commit is contained in:
mdecker 2011-04-19 14:58:39 +02:00
parent 251a90e64d
commit 2ca26d3d20
3 changed files with 5 additions and 4 deletions

View file

@ -441,7 +441,7 @@ def validate_candidate(items, tuple_dict, info):
tuple_dict[info['album_id']] = dist, ordered, info
def tag_album(items, search_artist=None, search_album=None):
def tag_album(items, config, search_artist=None, search_album=None):
"""Bundles together the functionality used to infer tags for a
set of items comprised by an album. Returns everything relevant:
- The current artist.
@ -474,7 +474,7 @@ def tag_album(items, search_artist=None, search_album=None):
# Otherwise, this match will compete against metadata-based
# matches.
rec = recommendation(out_tuples.values())
if rec == RECOMMEND_STRONG:
if rec == RECOMMEND_STRONG and not config.interactive_autotag:
log.debug('ID match.')
return cur_artist, cur_album, out_tuples.values(), rec

View file

@ -330,7 +330,7 @@ def initial_lookup(config):
log.debug('Looking up: %s' % task.path)
try:
task.set_match(*autotag.tag_album(task.items))
task.set_match(*autotag.tag_album(task.items, config))
except autotag.AutotagError:
task.set_null_match()

View file

@ -344,7 +344,8 @@ def choose_match(task, config):
search_artist, search_album = manual_search(False)
try:
_, _, candidates, rec = \
autotag.tag_album(task.items, search_artist, search_album)
autotag.tag_album(task.items, config,
search_artist=search_artist, search_album=search_album)
except autotag.AutotagError:
candidates, rec = None, None
else: