diff --git a/beetsplug/play.py b/beetsplug/play.py index 409e0c4ab..8477acbfc 100644 --- a/beetsplug/play.py +++ b/beetsplug/play.py @@ -82,9 +82,9 @@ class PlayPlugin(BeetsPlugin): help=u'add additional arguments to the command', ) play_command.parser.add_option( - u'-f', u'--force', + u'-y', u'--yes', action="store_true", - help=u'disable the warning threshold', + help=u'skip the warning threshold', ) play_command.func = self._play_command return [play_command] @@ -130,8 +130,8 @@ class PlayPlugin(BeetsPlugin): # Check if the selection exceeds configured threshold. If True, # cancel, otherwise proceed with play command. - if opts.force or not self._exceeds_threshold(selection, command_str, open_args, - item_type): + if opts.yes or not self._exceeds_threshold( + selection, command_str, open_args, item_type): play(command_str, selection, paths, open_args, self._log, item_type) diff --git a/docs/changelog.rst b/docs/changelog.rst index cd539d0cf..7fa0dbcbb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -49,7 +49,7 @@ New features: :bug:`2366` :bug:`2495` * Importing a release with multiple release events now selects the event based on your :ref:`preferred` countries. :bug:`2501` -* :doc:`/plugins/play`: A new ``-f`` or ``--force`` parameter lets you skip +* :doc:`/plugins/play`: A new ``-y`` or ``--yes`` parameter lets you skip the warning message if you enqueue more items than the warning threshold usually allows. diff --git a/docs/plugins/play.rst b/docs/plugins/play.rst index 71baa0388..3a08a4239 100644 --- a/docs/plugins/play.rst +++ b/docs/plugins/play.rst @@ -95,8 +95,9 @@ example:: indicates that you need to insert extra arguments before specifying the playlist. -The ``--force`` (or ``-f``) flag to the ``play`` command will skip the warning -message if you choose to play more items than the **warning_threshold** value. +The ``--yes`` (or ``-y``) flag to the ``play`` command will skip the warning +message if you choose to play more items than the **warning_threshold** +value usually allows. Note on the Leakage of the Generated Playlists ---------------------------------------------- diff --git a/test/test_play.py b/test/test_play.py index 685632b40..9721143cc 100644 --- a/test/test_play.py +++ b/test/test_play.py @@ -115,7 +115,7 @@ class PlayPluginTest(unittest.TestCase, TestHelper): open_mock.assert_not_called() - def test_force_warning_threshold_bypass(self, open_mock): + def test_skip_warning_threshold_bypass(self, open_mock): self.config['play']['warning_threshold'] = 1 self.other_item = self.add_item(title='another NiceTitle') @@ -126,7 +126,7 @@ class PlayPluginTest(unittest.TestCase, TestHelper): with control_stdin("a"): self.run_and_assert( open_mock, - [u'-f', u'NiceTitle'], + [u'-y', u'NiceTitle'], expected_playlist=expected_playlist) def test_command_failed(self, open_mock):