From 86b1f9282411b3afd2e8060b05e40851893c016d Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 16 Apr 2011 00:42:33 -0700 Subject: [PATCH] fix some (suprisingly few) airplane-coding bugs --- beets/importer.py | 10 +++++++--- beets/ui/commands.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/beets/importer.py b/beets/importer.py index a9f71ae35..a4b60f111 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -217,8 +217,12 @@ class ImportTask(object): if choice == action.SKIP: self.items = None # Items no longer needed. else: - info, items = choice - self.items = items # Reordered items list. + assert not isinstance(choice, action) + if self.is_album: + info, items = choice + self.items = items # Reordered items list. + else: + info = choice self.info = info self.choice_flag = action.APPLY # Implicit choice. @@ -487,7 +491,7 @@ def item_query(config): while True: task = yield task choice = config.choose_item_func(task, config) - task.set_choice(choice) + task.set_choice([choice]) def item_progress(config): """Skips the lookup and query stages in a non-autotagged singleton diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 9076a6efb..8d9885888 100755 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -219,7 +219,7 @@ def choose_candidate(candidates, singleton, rec, color, # Display list of candidates. if singleton: print_('Finding tags for track "%s - %s".' % - (item.artist, item.album)) + (item.artist, item.title)) print_('Candidates:') for i, (dist, info) in enumerate(candidates): print_('%i. %s - %s (%s)' % (i+1, info['artist'],