mirror of
https://github.com/beetbox/beets.git
synced 2025-12-25 10:05:13 +01:00
rename --force to --yes in play plugin
fix some pep8 goo
This commit is contained in:
parent
ffcaf33845
commit
02aa6191c1
4 changed files with 10 additions and 9 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
----------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue