This has been a long time coming, but we now finally keep track of ReplayGain
values in the database. This is an intermediate step toward a refactoring of the
RG plugin; at the moment, these values are not actually saved!
We now always calculate album gain when importing an album. This is "free" (no
performance cost) now and players are free to ignore the setting if they so
choose.
This ensures accurate album-level data. It also fixes a problem with the old way
of doing things where the MediaFiles and tool results would become misaligned if
a subset of the tracks needed recalculation.
Invocations of the mp3gain/aacgain commands are now wrapped in a centralized
function that takes care of output capture and error handling. This avoids code
duplication for the various sites at which the tool needs to be invoked.
This change also avoids unintentionally modifying tags via the command-line
tool. The "-s s" option makes the tool *just* calculate RG values rather than
toying with tags at all.
This is fixed by allowing MediaFiles to convert strings to integers on
assignment. An eventual complete fix will perform these type conversions in the
Item interface.
Eliminate the __subclasses__ trick for finding all plugins. Now we explicitly
look in each plugin module for a plugin class. This allows us to import plugin
modules with unintentionally loading them. This lets us reuse the image
embedding machinery without copypasta.
I mistakenly assumed that the value sent to _regexp from SQLite would be a str
object. It's a buffer object, of course. This change explicitly converts to a
str before doing the decoding.
@tezoulbr: I'm changing these to debug messages partially so they don't print
out when running the tests (with nose, for example) but also because it could
get a little annoying for someone who *intends* to use the defaults for one of
these plugins. Let me know if you disagree.