From 4551a89c0eee9d351afc8f4ab2288085551e953c Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Sat, 1 Feb 2014 20:34:21 +0100 Subject: [PATCH] Ask if `should_skip()` instead of sentinel --- beets/importer.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/beets/importer.py b/beets/importer.py index 45a77dacd..68d6b566e 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -365,6 +365,7 @@ class ImportTask(object): self.sentinel = False self.remove_duplicates = False self.is_album = True + self.choice_flag = None @classmethod def done_sentinel(cls, toppath): @@ -646,7 +647,7 @@ def initial_lookup(session): task = None while True: task = yield task - if task.sentinel: + if task.should_skip(): continue plugins.send('import_task_start', session=session, task=task) @@ -666,7 +667,7 @@ def user_query(session): task = None while True: task = yield task - if task.sentinel: + if task.should_skip(): continue # Ask the user for a choice. @@ -724,7 +725,7 @@ def show_progress(session): task = None while True: task = yield task - if task.sentinel: + if task.should_skip(): continue log.info(displayable_path(task.paths)) @@ -960,7 +961,7 @@ def item_lookup(session): task = None while True: task = yield task - if task.sentinel: + if task.should_skip(): continue plugins.send('import_task_start', session=session, task=task) @@ -975,7 +976,7 @@ def item_query(session): recent = set() while True: task = yield task - if task.sentinel: + if task.should_skip(): continue choice = session.choose_item(task) @@ -999,7 +1000,7 @@ def item_progress(session): log.info('Importing items:') while True: task = yield task - if task.sentinel: + if task.should_skip(): continue log.info(displayable_path(task.item.path)) @@ -1017,7 +1018,7 @@ def group_albums(session): task = None while True: task = yield task - if task.sentinel: + if task.should_skip(): continue tasks = [] for _, items in itertools.groupby(task.items, group):