From 72056e8e073dabbacb229f2542ccbd47180df010 Mon Sep 17 00:00:00 2001 From: "nath@laptop" Date: Wed, 6 Jan 2016 09:16:46 +0100 Subject: [PATCH] play: Fix typo treshold > threshold: We should warn users that the corresponding config key changed accordingly. --- beetsplug/play.py | 6 +++--- docs/plugins/play.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/beetsplug/play.py b/beetsplug/play.py index 52bf75aa5..b622713c0 100644 --- a/beetsplug/play.py +++ b/beetsplug/play.py @@ -41,7 +41,7 @@ class PlayPlugin(BeetsPlugin): 'use_folders': False, 'relative_to': None, 'raw': False, - 'warning_treshold': 100, + 'warning_threshold': 100, }) def commands(self): @@ -68,7 +68,7 @@ class PlayPlugin(BeetsPlugin): use_folders = config['play']['use_folders'].get(bool) relative_to = config['play']['relative_to'].get() raw = config['play']['raw'].get(bool) - warning_treshold = config['play']['warning_treshold'].get(int) + warning_threshold = config['play']['warning_threshold'].get(int) if relative_to: relative_to = util.normpath(relative_to) @@ -110,7 +110,7 @@ class PlayPlugin(BeetsPlugin): return # Warn user before playing any huge playlists. - if warning_treshold and len(selection) > warning_treshold: + if warning_threshold and len(selection) > warning_threshold: ui.print_(ui.colorize( 'text_warning', 'You are about to queue {0} {1}.'.format(len(selection), diff --git a/docs/plugins/play.rst b/docs/plugins/play.rst index 5092ce846..55733cbaa 100644 --- a/docs/plugins/play.rst +++ b/docs/plugins/play.rst @@ -47,7 +47,7 @@ configuration file. The available options are: - **raw**: Instead of creating a temporary m3u playlist and then opening it, simply call the command with the paths returned by the query as arguments. Default: ``no``. -- **warning_treshold**: Set the minimum number of files to play which will +- **warning_threshold**: Set the minimum number of files to play which will trigger a warning to be emitted. If set to ``no``, warning are never issued. Default: 100.