Log in

View Full Version : querymusicdatabase HTTP API command not supported?

January 9th, 2010, 03:07 AM
According to the HTTP API docs at http://xbmc.org/wiki/?title=WebServerHTTP-API#Commands_that_Retrieve_Information

there is a command called "querymusicdatabase"

When I run this command in my browser it returns only one genre... "karaoke" of al things.*%2 0from%20genre%29

Can anybody else confirm this behaviour? You can look at the data in your sqllite database by installing this sqlite program: http://sqlitebrowser.sourceforge.net/

After you install it, open the file:


Please tell me what you find in your database tabls? Especially the "genre" table.

From what I can tell, this database is completely empty! :eek:

Am I going crazy here? :confused:

January 12th, 2010, 11:24 AM
As far as I can tell, Boxee doesn't use the xmbc databases; instead, it has its own database (boxee/userdata/boxee_catalog.db), and the querymusicdatabase/queryvideodatabase commands don't know where that DB is and therefore can't query it. If there *is* a way of remotely querying the Boxee DB through the HTTP API, that'd be really useful information.

January 12th, 2010, 11:46 AM
(erm, XBMC databases. Stupid fingers.)

March 1st, 2010, 03:59 PM
As querymusicdatabae doesn't work I went playing with the iphone web interface to see how they are doing it.
I found out it doesn't use the database at all. It first queries GetMediaLocation(music) and after that GetShares([medialocation]).

So that's a way to do it although querymusicdatabase would be a much nicer way...
I'll have a look at the boxee sourcecode to see if it's possible to change the database location...

June 26th, 2010, 05:56 PM
I was able to get this working by creating symlinks from the MyMusic7.db and MyVideos34.db to the boxee_catalog.db file. I'm not entirely sure of the repercussions on the rest of the Boxee system, but I can now access the database via the HTTP API. If your OS supports symlinks, it might be worth trying out.

Here are the commands:

ln -sf ~/.boxee/UserData/profiles/[yourprofilename]/Database/MyMusic7.db ~/.boxee/UserData/Database/boxee_catalog.db
ln -sf ~/.boxee/UserData/profiles/[yourprofilename]/Database/MyVideos34.db ~/.boxee/UserData/Database/boxee_catalog.db

Now restart Boxee and try to hit the following URLs in a browser:

http://localhost:8800/xbmcCmds/xbmcHttp?command=querymusicdatabase(select%20idArt ist,%20strName%20from%20artists)

http://localhost:8800/xbmcCmds/xbmcHttp?command=queryvideodatabase(select%20idVid eo,%20strTitle%20from%20video_files)

You should get back XML. Note that, since Boxee keeps both video and audio in the same DB, you can execute the same query in either place and get a response. It's also worth noting that Boxee uses different table & column names, so you'll probably want to pop open a sqlite browser to explore the schema as the xbmc documentation will not likely apply.

February 9th, 2011, 03:30 PM
Hmm, Im looking into this to... it did not work to symlink my databases :(

Are there any plans to include some similar functonality to browse the db from http any time soon?


PS. I Copyd the boxee_catalog.db file to MyVideos34.db (the Select * from version should print out 71, but it still prints 330 wich is xbmc's line)
I also copied an old version of xbmc's db, and then I actually could get the informasion from the database as it is on xbmc...

Maybe a script that looks for updates in boxee_catalog at an given interval, and when it finds some, it adds the corect info to MyVideos34.db??

[EDIT] But where does the text from select * from path come from?