Author Topic: CD Information from CDDB/gnudb: User email and app name  (Read 303 times)

Gausi

  • Posts: 11
I am trying to re-activate the cddb-feature on my mp3-player. A few years ago, I used freeDB for this. I recently learned that there is a "new" server for the CDDB, gnudb.gnudb.org. With the new version of the basscd.dll it works fine so far.

However, the documentation on gnudb.org says
Quote
Make sure you are using a valid email address which can identify you. This enables the blocking of a users which are using gnudb in a way which is not appropriate. If you use a email address which other users also use, you risk being denied access to gnudb when on of the other users are misusing the gnudb service.
Email and app name are mandatory parameters in the "GET" command to query gnudb. With the help of Wireshark, I found out that the basscd.dll uses a generic "basscd@un4seen.com" as email and "BASSCD 2.4.7.1" as the app name.

Is there a way to change these values?

Ian @ un4seen

  • Administrator
  • Posts: 25047
It isn't currently possible to configure that, but here's an update for you to try:

   www.un4seen.com/stuff/basscd.zip

It adds a BASS_CONFIG_CD_CDDB_HELLO option, which can be set like this:

Code: [Select]
BASS_SetConfigPtr(BASS_CONFIG_CD_CDDB_HELLO, "emailname+emaildomain+appname+appversion");

Let me know if you have any trouble with it.

Gausi

  • Posts: 11
Wow, this is not what I expected!  Thank your for this quick reply! :)

As I work with Delphi, I had to adapt the changes in the basscd.h by adding
Code: [Select]
BASS_CONFIG_CD_CDDB_HELLO = $10207;to the basscd.pas.

A quick test with
Code: [Select]
BASS_SetConfigPtr(BASS_CONFIG_CD_CDDB_HELLO or BASS_UNICODE, PChar('mymail+mydomain.de+app+1.0'));is working perfectly fine (I checked only the 32bit version).

If the email includes a "+" sign, it should be used with quotes, e.g.
Code: [Select]
BASS_SetConfigPtr(BASS_CONFIG_CD_CDDB_HELLO or BASS_UNICODE, PChar('"my+mail"+"my+domain.de"+app+1.0'));
Otherwise, the server will return an error message stating that the number of arguments doesn't match. But checking user input is up to the developer using the basscd.dll, anyway.

Ian @ un4seen

  • Administrator
  • Posts: 25047
Good to hear that the update is working well for you. Regarding '+' characters in the email address (or app name), I think they should probably be URL-encoded (to %2B) rather than put in quotes. Note '+' is an encoded space.

   www.wikipedia.org/wiki/Percent-encoding