mirror of
https://github.com/beetbox/beets.git
synced 2026-01-14 04:01:43 +01:00
fix bug where $args would be included in the command output if $args was
set in config but -A or --args was left off the beet play command.
This commit is contained in:
parent
327bebbd23
commit
9fb763e151
2 changed files with 9 additions and 0 deletions
|
|
@ -90,6 +90,9 @@ class PlayPlugin(BeetsPlugin):
|
|||
command_str = command_str.replace(ARGS_MARKER, opts.args)
|
||||
else:
|
||||
command_str = u"{} {}".format(command_str, opts.args)
|
||||
else:
|
||||
if ARGS_MARKER in command_str:
|
||||
command_str = command_str.replace(" "+ARGS_MARKER, "")
|
||||
|
||||
# Perform search by album and add folders rather than tracks to
|
||||
# playlist.
|
||||
|
|
|
|||
|
|
@ -67,6 +67,12 @@ class PlayPluginTest(unittest.TestCase, TestHelper):
|
|||
self.run_and_assert(
|
||||
open_mock, [u'-A', u'foo', u'title:aNiceTitle'], u'echo foo other')
|
||||
|
||||
def test_unset_args_option_in_middle(self, open_mock):
|
||||
self.config['play']['command'] = 'echo $args other'
|
||||
|
||||
self.run_and_assert(
|
||||
open_mock, [u'title:aNiceTitle'], u'echo other')
|
||||
|
||||
def test_relative_to(self, open_mock):
|
||||
self.config['play']['command'] = 'echo'
|
||||
self.config['play']['relative_to'] = '/something'
|
||||
|
|
|
|||
Loading…
Reference in a new issue