PDA

View Full Version : SC7 Database structure



Pascal Hibon
2008-06-17, 10:39
This post is linked to a previous post I made in regards to WAV tagging.
It turns out that SqueezeCenter does not support ID3v2.3 tags in wav files. So I thought maybe there is another way. In the wiki part of the website I read that SqueezeCenter is using an embedded version of mySQL. I could write a program that accesses this database and writes the music information in there. The application is like the rescan music library plug-in. The only difference is that my rescan application would read the ID3v2.3 tags inside the wav files and updates the mySQL database.

I couldn’t find any information on the database structure used by SqueezeCenter and how to access the embedded mySQL version. Can anyone help me with that?

Thanks!

gharris999
2008-06-17, 16:20
This post is linked to a previous post I made in regards to WAV tagging.
It turns out that SqueezeCenter does not support ID3v2.3 tags in wav files. So I thought maybe there is another way. In the wiki part of the website I read that SqueezeCenter is using an embedded version of mySQL. I could write a program that accesses this database and writes the music information in there. The application is like the rescan music library plug-in. The only difference is that my rescan application would read the ID3v2.3 tags inside the wav files and updates the mySQL database.

I couldn’t find any information on the database structure used by SqueezeCenter and how to access the embedded mySQL version. Can anyone help me with that?

Thanks!
Assuming that you are running SC on some linux box:

Make sure port 9092 is open in the server's firewall

Edit /usr/share/squeezecenter/MySQL/my.tt and comment out the line:

bind-address = [% bindAddress %]

..so that it reads:

#bind-address = [% bindAddress %]

Restart SC.

You can then use mysql-adminsitrator, connecting to your server's IP on port 9092 to look at the tables in the "slimserver" catalog.

If you really want pursue this path, you may find it easier to configure SC to use the "standard" mysql server port. In that case, you'll need to create a "squeezecenter" mysql user and create an empty squeezecenterdata schemata and grant all rights to the squeezecenter user.

Then, modify your /var/lib/squeezecenter/prefs/server.prefs so that the db entries look like this:



dbpassword: squeezecenter
dbsource: dbi:mysql:hostname=127.0.0.1;port=3306;database=sq ueezecenterdata
dbusername: squeezecenter


Restart SC and it will create all the necessary tables, indexes, etc. in squeezecenterdata and rescan your music library.

slimkid
2008-06-17, 21:32
hope this helps.

K

gharris999
2008-06-18, 08:52
hope this helps.

K

Yikes! .

erland
2008-06-18, 09:15
I could write a program that accesses this database and writes the music information in there. The application is like the rescan music library plug-in. The only difference is that my rescan application would read the ID3v2.3 tags inside the wav files and updates the mySQL database.

Wouldn't it be better to provide a patch so SqueezeCenter can support this by default ?

I believe the WAV tag reading code is in:
Slim/Formats/Wav.pm

And the MP3 ID3v2 tag reading code is in:
Slim/Formats/MP3.pm

Pascal Hibon
2008-06-20, 11:03
Wow ... thank you all for the great help!

Erland, I will look into you suggestion as well.

Thanks again.