Database location breaks HTTP API querymusicdatabase
#1
According to the HTTP API docs at http://wiki.xbmc.org/?title=WebServe...ve_Information

there is a command called "querymusicdatabase"

When I run this command to "select * from genre" in my browser it returns only one genre... "karaoke" of all things:

Code:
10.168.1.25:8800/xbmcCmds/xbmcHttp?command=querymusicdatabase%28select%20*%20from%20genre%29

Can anybody else confirm this behavior? 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:

C:\Users\<username>\AppData\Roaming\xbmc\userdata \profiles\<xbmcuser>\Database\MyMusic7.db

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

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

After more research, C:\Users\<username>\AppData\Roaming\xbmc\userdata\Database\xbmc_catalog.db

So, it seems there is a bug in the xbmc code.... the querymusicdatabase command is using the incorrect db file.

Should I log this as a bug?
Reply
#2
Everything related to the httpd is going to change soon, I'd hold off reporting as a bug until after the jsonrpc branch is merged. Also, this specific httpapi command will likely be going away due to being utterly retarded from a security standpoint.
Reply
#3
Are you using Library mode? Perhaps MyMusic7.db hasn't been populated with anything yet.

That SQL command on my system returns:

1Rock2Unknown3Folk4Indie5Alternative6Dance7Blues8Pop9Religious10singer-songwriter11World & Folk12Soul and R&B13Jazz14Christmas15Child Ballad 10016Other17Classical18Metal19Classic Rock20Soundtrack21Shoegazer22Soundtracks23Vocal24Country25Alternative & Punk26World27(null)28Soul29Heavy Metal30Hard Rock31Punk32Electronica33Rock & Roll34Celtic35Rock/Pop36Chanson37Lo Fi38Bluegrass39KIDS/FAMILY: Kid Friendly40Acoustic41Progressive Rock42Renaissance Faire Music43Early Music44Rap45Trip-Hop46Comedy47Avantgarde48Alternative Rock49Dance & DJ50Folk-Rock51R&B52Progressive Metal53Rap & Hip-Hop54Krautrock55INTERNATIONAL(POPS)56General Unclassifiable57Styles58Electronic59Dance & Electronic60Indie Pop61Children62Klassik63Disco64Punk Rock65Pop Rock66Traditional Country67Vocal Pop68Brit Rock69Art Rock70K-Rock71Easy Listening72Oldies73Ska74Rap & Hip Hop75Pop-Folk76Swing77Psychedelic78Psychedelic Rock79Funk80Spoken81Bargain CDs82General Rock83Finnish folk84Mechanical85Children's Music86Holiday87Crossover88Podcast89Christmas/Holiday90Alt. Rock91Brechtian punk cabaret92Medieval Music93Swedish folk94Christmas Swing95Contemporary Christian96New Age97Misc98Filk99Folk Rock100Grunge101RockNRoll102Sound Track103Reggae104Darkwave105Soundtracks & Musicals106Diversen107Urban Folk108New Wave109Ambient

Reply
#4
I suggest the HTTP API command querymusicdatabase or a facsimile of its functionality stays in the jasonrpc code. The querymusicdatabase call is very useful.
I am an expert at acting like an expert ---- WC Fields.

XBMC Web Control Interface - https://github.com/mthiels/webinterface.xrc
Reply
#5
Kabooga Wrote:I suggest the HTTP API command querymusicdatabase or a facsimile of its functionality stays in the jasonrpc code. The querymusicdatabase call is very useful.

Stay? it will be so nicely wrapped you'll feel spoiled Wink

MusicLibrary.GetArtists and you get them, MusicLibrary.GetSongs filter with artistid genreid and all, even sort and such will be there.

The biggest reason we wanted a new layer redesigned from that ground was wrap, portability and security.
  • Wraping, so how much it changes internally the client shouldn't know.
  • Portability, the transport be it tcp sockets, udp bluetooth or http the actual processing of the methods aren't conserned.
  • Security, a client may only do certain stuff (privledges), in example control playback and read data but cannot shutdown. Similair to how it is in android.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#6
Ohhh...Nice!!

I got the jsonrpc branch. I couldn't build in the Windows environment. Sorry I don't have any Linux boxes to build with.

I just have to wait and see the changes. This is kinda like waiting in anticipation for Christmas (yes...I still believe in Santa).

Kabooga
I am an expert at acting like an expert ---- WC Fields.

XBMC Web Control Interface - https://github.com/mthiels/webinterface.xrc
Reply
#7
Yeah its crippled on windows now, I hope to get it running on windows soon. As I'm no webdeveloper myself I'd love input on how to best do it and what stuff should be there for making it easier for webdevelopers. The new web interface, wich all help with would be appreciated, will be using jsonrpc solely.

Here is the trac ticket #8072 with some discussion and examples, there is an example proof of concept web interface in the web folder (if you didn't see it)

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#8
One group of people to get input for the new API are the Supplemental Tools developers.

These developers are definitely pushing the current API to its limits.

Cheers,
Kabooga.
I am an expert at acting like an expert ---- WC Fields.

XBMC Web Control Interface - https://github.com/mthiels/webinterface.xrc
Reply
#9
nad Wrote:Are you using Library mode? Perhaps MyMusic7.db hasn't been populated with anything yet.

That SQL command on my system returns:

1Rock2Unknown3Folk4Indie5Alternative6Dance7Blues8Pop9Religious10singer-songwriter11World & Folk12Soul and R&B13Jazz14Christmas15Child Ballad 10016Other17Classical18Metal19Classic Rock20Soundtrack21Shoegazer22Soundtracks23Vocal24Country25Alternative & Punk26World27(null)28Soul29Heavy Metal30Hard Rock31Punk32Electronica33Rock & Roll34Celtic35Rock/Pop36Chanson37Lo Fi38Bluegrass39KIDS/FAMILY: Kid Friendly40Acoustic41Progressive Rock42Renaissance Faire Music43Early Music44Rap45Trip-Hop46Comedy47Avantgarde48Alternative Rock49Dance & DJ50Folk-Rock51R&B52Progressive Metal53Rap & Hip-Hop54Krautrock55INTERNATIONAL(POPS)56General Unclassifiable57Styles58Electronic59Dance & Electronic60Indie Pop61Children62Klassik63Disco64Punk Rock65Pop Rock66Traditional Country67Vocal Pop68Brit Rock69Art Rock70K-Rock71Easy Listening72Oldies73Ska74Rap & Hip Hop75Pop-Folk76Swing77Psychedelic78Psychedelic Rock79Funk80Spoken81Bargain CDs82General Rock83Finnish folk84Mechanical85Children's Music86Holiday87Crossover88Podcast89Christmas/Holiday90Alt. Rock91Brechtian punk cabaret92Medieval Music93Swedish folk94Christmas Swing95Contemporary Christian96New Age97Misc98Filk99Folk Rock100Grunge101RockNRoll102Sound Track103Reggae104Darkwave105Soundtracks & Musicals106Diversen107Urban Folk108New Wave109Ambient

did you query myMusic7.db to get this test data? My point is that the data is in xbmc_catalog, it is NOT being copied over to myMusic7.db. See my point? :confused2:

when will the new JSON wrapper be integrated into the stable branch?
Reply
#10
xbmc_catalog is meaningless to XBMC. It does not read or write such a file, ever.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
ok, I must be getting confused. Actually I am using boxee, and I guess their developers are storing the data in that file (named boxee_catalog). Sorry for the confusion..
Reply
#12
yitrc Wrote:ok, I must be getting confused. Actually I am using boxee, and I guess their developers are storing the data in that file (named boxee_catalog). Sorry for the confusion..

I'm pretty sure boxee doesn't handle httpapi well, if at all, and they have a very different db schema afaik.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply

Logout Mark Read Team Forum Stats Members Help
Database location breaks HTTP API querymusicdatabase0