This makes it cleaner to share the high-level image-embedding logic between
the `embedart` and `convert` plugins. This resolves a regression, introduced
in f504c786, that inadvertently activated the former plugin when the latter
was enabled. I also like avoiding cross-plugin imports.
Add a new OptionParser subclass: CommonOptionsOptionParser, which
provides facilities for adding --album, --path and --format options. The
last one is quite versatile.
Update base commands (from beets.ui.commands) to use those.
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.
Breaking changes: plugins should set set _import_stages instead of
import_stages. From outside the latter is replaced by import_stages().
This is because it is now wrapped with log level-getting & -setting
statements.
Only implemented to work when matching albums instead of tracks (-a option).
Disabled by default in the configuration of 'convert'.
fix indentation.
Fix Travis nagging over indentation (hopefully).
Finally pep8 conforming.
When set to true, this config option chooses copying over converting when the
source file is in a lossy format. At the moment, everything except ape, flac,
alac and wav is considered lossy.
There were a number of problems with the changes to the util melange:
- It used print rather than logging, and its string formatting was probably
not Unicode-ready.
- The shell-command-like print lines were not quite compatible, which makes
their general usefulness questionable.
- Used an unsafe/leaky global variable for mkdirall.
- Used deprecated sets.Set.
Seemed better just to add this to the plugin where we need it so it's easier
to see where this goes.
It also seems unnecessary to me to print `mkdir -p` commands. They just
clutter up the output for me when I really just want to see the transcoding
commands.
This option allows the user to specify the format on the command line
instead of editing the configuration.
The commit also includes some refactoring. In particular adding
arguments to functions to avoid dependence on global state.
Doc and Changelog in next commit
Partially resolves#877 showing:
- Directory creation
- Copies
- Deletes
- Moves
- Encodings
Information about tagging and plugins on _after_convert_ is not
currently shown. That requires changing the plugins to support the
pretend option, so a lot of work may be needed and it doesn't seem to be
helpful enough for me.