PDA

View Full Version : Database Work?



kodenine
2005-09-30, 11:07
I was reading through your Help Wanted section and ran across this:

"Database IntegrationóWork is currently underway to support a database back-end for the SlimServer."

Is there database work that needs to be done? The reason I ask is I'm looking at using the SlimServer database to query songs, artists, genres, etc... so I can create playlists based on third party data like last.fm Recommended artists, Radio Station Playlists, MusicMagic Mixes, etc... Anyway I need a way to search my music collection. I was hoping not to reinvent the wheel here.

I guess my question is can I query out artist, album, genre, etc... easly from SlimServer?

I've looked around quite a bit. I see that queries seem to orginate from Slim::DataStores::DataModel. Most of those queries seem to come from Slim::Music::Info and Slim::Music::LiveSearch. Am I in the right place? Should I be using Slim::Music::LiveSearch to search for things like: All Songs by Artist X?

I will most likely need to do some more exploring, but just in case anyone would like to give me a head start that would be great.

Thanks,

Jamin

PS Great Product!

max.spicer
2005-09-30, 11:19
You'll probably find http://sqlitebrowser.sourceforge.net/ useful. Point it at your .slimserversql.db file (mine is at /var/cache/slimserver/.slimserversql.db) and have a browse. This will show you all the existing tables and allow you to fire sql queries at them.

I'm running slimserver on linux but using the above tool on Windows and accessing the db via a samba share, by the way.

Max


I was reading through your Help Wanted section and ran across this:

"Database IntegrationóWork is currently underway to support a database back-end for the SlimServer."

Is there database work that needs to be done? The reason I ask is I'm looking at using the SlimServer database to query songs, artists, genres, etc... so I can create playlists based on third party data like last.fm Recommended artists, Radio Station Playlists, MusicMagic Mixes, etc... Anyway I need a way to search my music collection. I was hoping not to reinvent the wheel here.

I guess my question is can I query out artist, album, genre, etc... easly from SlimServer?

I've looked around quite a bit. I see that queries seem to orginate from Slim::DataStores::DataModel. Most of those queries seem to come from Slim::Music::Info and Slim::Music::LiveSearch. Am I in the right place? Should I be using Slim::Music::LiveSearch to search for things like: All Songs by Artist X?

I will most likely need to do some more exploring, but just in case anyone would like to give me a head start that would be great.

Thanks,

Jamin

PS Great Product!

kodenine
2005-09-30, 11:45
I was hoping to get something working outside of SlimServer first so this might work. Thanks.

But if I wanted to make this into a plugin I don't think it would be good to read the file "behind SlimServer's back" would it? There isn't a way to use the existing SlimServer connection to the database? Just a code reference of where a SlimClient queries the SlimServer for artist names would be a huge amount of help.


Thanks,

Jamin

max.spicer
2005-09-30, 11:59
You've already got that, it's in DataModel.pm.

Max


But if I wanted to make this into a plugin I don't think it would be good to read the file "behind SlimServer's back" would it? There isn't a way to use the existing SlimServer connection to the database? Just a code reference of where a SlimClient queries the SlimServer for artist names would be a huge amount of help.


Thanks,

Jamin