Skip to content

Commit

Permalink
Actually, push the job off on the caller
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseWeinstein committed Jan 3, 2016
1 parent 25c31a7 commit 246afda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 7 additions & 8 deletions beets/util/__init__.py
Expand Up @@ -776,14 +776,13 @@ def interactive_open(targets, command):
Can raise `OSError`.
"""
if command:
# Split the command string into its arguments.
try:
args = shlex_split(command)
except ValueError: # Malformed shell tokens.
args = [command]
else:
args = [open_anything()]
assert command

# Split the command string into its arguments.
try:
args = shlex_split(command)
except ValueError: # Malformed shell tokens.
args = [command]

args.insert(0, args[0]) # for argv[0]

Expand Down
2 changes: 2 additions & 0 deletions beetsplug/play.py
Expand Up @@ -63,6 +63,8 @@ def play_music(self, lib, opts, args):
command passing that playlist, at request insert optional arguments.
"""
command_str = config['play']['command'].get()
if not command_str:
command_str = util.open_anything()
use_folders = config['play']['use_folders'].get(bool)
relative_to = config['play']['relative_to'].get()
raw = config['play']['raw'].get(bool)
Expand Down

0 comments on commit 246afda

Please sign in to comment.