From 2ca26d3d2056c05abbfe29e538a5f883860f0e86 Mon Sep 17 00:00:00 2001 From: mdecker Date: Tue, 19 Apr 2011 14:58:39 +0200 Subject: [PATCH] bugfix for 251a90e6 now user is not only asked for a manual choice but is also able to choose another album ;) --- beets/autotag/__init__.py | 4 ++-- beets/importer.py | 2 +- beets/ui/commands.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index 0827da6b6..b9595d7b8 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -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 diff --git a/beets/importer.py b/beets/importer.py index 10d70738b..8bafa8003 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -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() diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 3de901d3c..072d5d9fd 100755 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -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: