Help - Search - Members - Calendar
Full Version: foo_freedb2 discid generation
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
Quadro
Because the tags of cd's I download are often not as I want, I used to import them in to foobar, then right-click -> get freedb tags, etc. and it worked perfectly for me, but I'd like to see this process a bit more automated, so I started working on a set of scripts that would do that for me.

Now, my question in this is that i stumbled on the fact that, somehow, the freedb2 plugin generates a discid based on the info gotten from the list of mp3's. That "somehow" part is important to me, because I want to integrate it into a command line script (python, fyi) and I can't use the foobar plugin.

I've searched for hours and hours, but I could no where find a way to convert a list of audio-files to a freedb discid. I know it has something to do with CD TOC's etc., but could the developer of the freedb2 plugin or someone else tell me how the person in question did that?
I would be very, very, very grateful smile.gif
foosion
foo_freedb2 uses the track lengths to calculate an estimate for the DiscID. It uses the algorithm described in the freedb documentation (available from here) and assumes that the offset of the first track is 0 and that there is no data track.
Quadro
But you generate an "estimate discid". How does freedb know or how can you tell freedb that you're not requesting that exact id, but look for an estimate?
foosion
Just as you would do with a regular lookup: Use a "query" command before the "read" command.
Quadro
Thank you very much for your help, I just fixed the script biggrin.gif It was a bit of a mess with getting the length of the mp3, but finally i found a decent python library for windows doing the job.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.