mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 09:04:33 +01:00
Remove compatibility with misspelled config option
This has been hanging around long enough; it's about time to drop the old name.
This commit is contained in:
parent
c9ec5e411c
commit
6b9d766082
2 changed files with 3 additions and 13 deletions
|
|
@ -64,9 +64,7 @@ class PlayPlugin(BeetsPlugin):
|
|||
'use_folders': False,
|
||||
'relative_to': None,
|
||||
'raw': False,
|
||||
# Backwards compatibility. See #1803 and line 155
|
||||
'warning_threshold': -2,
|
||||
'warning_treshold': 100,
|
||||
'warning_threshold': 100,
|
||||
})
|
||||
|
||||
self.register_listener('before_choose_candidate',
|
||||
|
|
@ -162,16 +160,6 @@ class PlayPlugin(BeetsPlugin):
|
|||
True, cancel playback. If False, execute play command.
|
||||
"""
|
||||
warning_threshold = config['play']['warning_threshold'].get(int)
|
||||
# We use -2 as a default value for warning_threshold to detect if it is
|
||||
# set or not. We can't use a falsey value because it would have an
|
||||
# actual meaning in the configuration of this plugin, and we do not use
|
||||
# -1 because some people might use it as a value to obtain no warning,
|
||||
# which wouldn't be that bad of a practice.
|
||||
if warning_threshold == -2:
|
||||
# if warning_threshold has not been set by user, look for
|
||||
# warning_treshold, to preserve backwards compatibility. See #1803.
|
||||
# warning_treshold has the correct default value of 100.
|
||||
warning_threshold = config['play']['warning_treshold'].get(int)
|
||||
|
||||
# Warn user before playing any huge playlists.
|
||||
if warning_threshold and len(selection) > warning_threshold:
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ Fixes:
|
|||
header when requesting lyrics. :bug:`2357`
|
||||
* :doc:`/plugins/embyupdate`: The plugin now checks whether an API key or a
|
||||
password is provided in the configuration.
|
||||
* :doc:`/plugins/play`: The misspelled configuration option
|
||||
``warning_treshold`` is no longer supported.
|
||||
|
||||
For plugin developers: new importer prompt choices (see :ref:`append_prompt_choices`), you can now provide new candidates for the user to consider.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue