diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 25ed0425d..72c345c68 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -440,7 +440,7 @@ def summarize_items(items, singleton): return ', '.join(summary_parts) -def _summary_judment(rec): +def _summary_judgment(rec): """Determines whether a decision should be made without even asking the user. This occurs in quiet mode and when an action is chosen for NONE recommendations. Return an action or None if the user should be @@ -697,7 +697,7 @@ class TerminalImportSession(importer.ImportSession): u' ({0} items)'.format(len(task.items))) # Take immediate action if appropriate. - action = _summary_judment(task.rec) + action = _summary_judgment(task.rec) if action == importer.action.APPLY: match = task.candidates[0] show_change(task.cur_artist, task.cur_album, match) @@ -757,7 +757,7 @@ class TerminalImportSession(importer.ImportSession): candidates, rec = task.candidates, task.rec # Take immediate action if appropriate. - action = _summary_judment(task.rec) + action = _summary_judgment(task.rec) if action == importer.action.APPLY: match = candidates[0] show_item_change(task.item, match) diff --git a/test/test_play.py b/test/test_play.py index 2c2c076de..d0371cf15 100644 --- a/test/test_play.py +++ b/test/test_play.py @@ -105,6 +105,15 @@ class PlayPluginTest(unittest.TestCase, TestHelper): self.open_mock.assert_not_called() + def test_warning_threshold_backwards_compat(self): + self.config['play']['warning_treshold'] = 1 + self.add_item(title='another NiceTitle') + + with control_stdin("a"): + self.run_command('play', 'nice') + + self.open_mock.assert_not_called() + def test_command_failed(self): self.open_mock.side_effect = OSError("some reason")