interactive_open should now be invoked with at least the list of
targets and optionally the command to open the targets with.
This allows beets-play to pass multiple file paths directly to
the configured command.
The changes to the existing invocations are pretty trivial in
order to comply to this refactor.
I slightly rewrote the play plugin in order to improve
the readability and to introduce the "raw" play config
option which makes beet simply pass a list of pathes
to the play command rather than a playlist.
* New argument `--optargs` reads string from option
* If "{}" is present in the given string, the `optargs`
from config-file get inserted at that point.
interactive_open() takes a target and an optional command, if it does not
receive a command then it uses open_anything().
It parses command and lexes it with shlex.split(), revieling the client
from that task.
"config -e" command uses it, and gives a better error message in case of
problem. "play" plugin uses it as well, as side-effect being that the
command is now interactive, as requested in issue #1321.
Fix issue #1321.
E.g., `colorize('text_success', 'hello world')`
To ensure compatibility with 3rd party plugins, a valid color ('red') can still be passed,
but it will be logged.
- Colors are mapped on to a dictionary using abstract names (e.g., text_success)
- Add `colors` option under `ui` to allow users to choose their own color scheme
- Move configuration option `color` from top-level to `ui`
- Show deprecation warning if top-level `color` configuration is used (but respect it)
Fix#1238
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.
Goal is smoothing the transition to python 3.
This commit changes the output of the play plugin to always use files instead of folders when generating a playlist when using the `-a` option. A new `use_folders` option was added to preserve the old behavior for anyone who wishes it.
This adds support for specifying additional options in the command config value
for the play plugin. Example:
play:
command: /usr/bin/command --option1 --option2 some_other_option