read cdrom toc and query freedb

For issues with communication ports, protocols, etc.
Post Reply
coderJeff
Site Admin
Posts: 4364
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

read cdrom toc and query freedb

Post by coderJeff »

Here's a program that reads a cdrom table of contents and queries freedb.org for discographies using the discid. First version I wrote was a few years ago. It does not have many features, but it does what I want. It saves (multiple) cddb records from freedb.org locally for me to use later.

Download Source: cddir-2015-05-28.zip 23K

I probably won't do much more with it, because it does what it needs to for me, but maybe some other is interested. I didn't intend for it to be windows only, it just kind of turned out that way because in the 1st version of the program, the calls to the ASPI layer (for winxp and earlier), and in the 2nd version the direct IOCTL calls (for win7). If the windows socket type was abstracted, might be able to pull out some parts to be used away from windows. Because of some changes in the windows headers between freebasic versions, might have to adjust these sources, or find the right version of fb, depending if your are trying to get first or second version to compile.

There is a readme.txt in the zip file, or you can see sample output here.
wallyg
Posts: 276
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: read cdrom toc and query freedb

Post by wallyg »

Any chance this program is still available? I so what version of FB did you use to compile/run it?

Thanks
Wally
coderJeff
Site Admin
Posts: 4364
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: read cdrom toc and query freedb

Post by coderJeff »

Not sure about the original fbc version but it would be 32-bit only
link is still good, you can download the zip file, contains the source

- freedb.org is closed down, but the service is available at gnudb.gnudb.org
- compiles with fbc 1.10.0 (last release)
- Just tried on windows 10, and accessing the cd-rom appears to work (I was surprised)

In 'freedb.bas': find
- conn.remote_hostname = "freedb.freedb.org"
and replace with:
- conn.remote_hostname = "gnudb.gnudb.org"

Hmm, tries to connect but fails.
I shall investigate
- appears it is possible to telnet to gnudb.gnudb.org:8880 which is the old cddb port
- but my program won't connect, probably my wrong use of winsock api or localhost lookup, and connect() can't reach the network
- anyway, they ask users to use http requests instead to interface with the database and looks like valid email address may be needed
- I haven't done any network programming in a few years so method is probably out of date now
- otherwise looks like the service free discography service is still available

Let me know if you need anything more, because I have no plans to continue work on this right now.
wallyg
Posts: 276
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: read cdrom toc and query freedb

Post by wallyg »

Thanks
Post Reply