Andy Hawkins <[EMAIL PROTECTED]> writes:
> Hi,
>
> In article <[EMAIL PROTECTED]>,
>            michael<[EMAIL PROTECTED]> wrote:
>> Personally, I like the quality of musicbrainz data over that of cddb.
>> So I've taken the "getalbum" program from the musicbrainz sample code,
>> and tweaked the printf statements to produce the format We're looking
>> for. It's not a perfect solution, but it works well enough that I
>> rarely have to further edit the output. I can send you a diff if you
>> like. 
>> I'm working on a more elegant solution, but it's far from ready for
>> use.
>
> Any chance you could send me the whole source of the program you're using?
> I've had generally good results through CDDB so far to be honest, but it
> would be useful to be able to increase the automation of the process.

No problem.
First grab the source for libmusicbrainz. You should be able to find
it here http://musicbrainz.org/products/client/download.html
or if you're on debian, just apt-get source libmusicbrainz2
Make sure you can build and install it.
Now grab this file http://fallenangel.com/mbvc.c
Drop this into the examples directory in the musicbrainz source
This is basically the same as the "getalbum.c" already in there, just
with the printf statements changed. You can build it by imitating what
the make file does for getalbum. This will probably be something like this..

gcc -I../lib -O2 -Wall -c -o mbvc.o mbvc.c
gcc -g -O2 -Wall -o mbvc mbvc.o ../lib/.libs/libmusicbrainz.so -lstdc++ -lm

Drop the resulting mbvc somewhere in /usr/local/bin or somewhere in
your path. You'll probably also want to grab cdlookup from the
examples directory as well.

mbvc expects an album id as an argument. You can test it by grabbing
an album id from the musicbrainz web site. It should spit out a series
of tags that are compatible with metaflac's --import-tags-from option.

Now to make this a bit more automated, use cdlookup to pull a disc id
for the cd currently in the drive (or a url to add the album to
musicbrainz if it's not already in the database). So now you can do
something like this...

export BROWSER=/bin/false; mbvc `cdlookup | perl 
-pe's|.*\?id=(.+)\&tracks=.*|$1|'` > cd.vc

Now you have the cd.vc file referenced in the previously mentioned
flac command.


Just for kicks, I put some of this stuff up at...
http://fallenangel.com/stupid.audio.tricks.txt

I hope that helps.

-michael

-- 
"I do not go out of my way to boldly split infinitives, 
 nor do I actively seek prepositions to end sentences with."
        -James W. Zubrick

Attachment: pgpXMeS3b3n1R.pgp
Description: PGP signature

_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to