Massive rework of CD lookup code to support multiple sources better
Thanks to Gabriel Rosenkoetter for his initial idea in this area, and
to Tomasz GoliĆski on irc for initial inspiration on how this should
work better.
There are now 3 different options for CD lookup: cddb, musicbrainz and
cdtext. They can all be listed in a comma-separated list for
CDDBMETHOD and the code will now call all of them in the sequence
listed. All the results will be combined into one list at the end for
the user to select, just like would have previously worked for one
source only.
Significant changes to the lookup code to make this happen:
* cdtext is now promoted to a first-class lookup option instead of
just a fallback
* We now *always* calculate the cddb-style discid and use that as our
unique reference in various places, even if only doing
musicbrainz. This makes things work more consistently.
* Checks for the contents of $CDDBMETHOD have all been updated to
cope with multiple entries
* Various variable names have been globally renamed to make things
more obvious: TRACKINFO->CDDBTRACKINFO, DISCID->CDDBDISCID etc.
* To help keep things separated, each lookup option has its own
temporary subdirectory under ABCDETEMPDIR. The number of matches is
kept globally in NUM_CDDB_MATCHES.
* For the cddb lookup code, merged together the three functions
do_cddbstat(), do_cddbquery() and do_cddbread() into one:
do_cddb_read(). The previous separation was pointless, as all three
were always called together in sequence anyway.
* Removed the CDDBLASTMETHOD handling as it's now obsolete. Instead,
once all the desired lookup methods have been called we will create
an empty template if needed then.