VoxCommando
Help and Support (Using VoxCommando) => Other Plugins => Topic started by: Mace on May 15, 2013, 04:48:58 AM
-
What does xJson do differently when generating an xml compared to xSQL?
I can add another table from any XBMC database to the xSQL generator and it will make the file.
How do i make xJSON do the same thing?
-
They do just about everything differently except that they both create payloadXML files that you can use.
If you can use the xSQL plugin then you should because it is better in every way. Faster, easier to use, and much more powerful.
In some cases though it is not possible, usually this only happens if you are using a mySQL database in XBMC or if your database files are in a location that VoxCommando can't reach for some reason.
xSQL plugin opens the sqlite database files directly and is able to perform sql queries to gather any information contained in the tables. It does this very efficiently, and lets you create your own sql queries which are powerful and easy to use. With xSQL, XBMC does not need to be running.
xJSON plugin must talk to XBMC through the http interface and request data using the JSON api, which only exposes certain information and is must clumsier and slow to use. XBMC must be running.
Here is a reference for the current XBMC JSON api (Frodo): http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6
the plugin uses calls such as this ( http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#AudioLibrary.GetAlbums ) and then parses the json data returned to create payload XML files:
-
I can create XML Payload files from the database with xSQL but it will return different information compared to creating the same XML Payload using xJSON, do you know why this is?
Can I add more commands to the xJSON plugin or is it easier to just run a seperate script to build different Payload XML ?
-
It's kind of difficult to say without more information.
What kind of differences are you talking about specifically?
It would help a lot if you could post both XML files, and if the differences are not obvious, please point them out. It could be as simple as them being sorted differently, and them looking different even though they contain all the same data.
-
here's the files:
TvShowTitles.xml from xSQL
<payload>
<value>59</value>
<phrase>2 Broke Girls</phrase>
<subsetmatching>true</subsetmatching>
</payload>
<payload>
<value>58</value>
<phrase>Alphas</phrase>
<subsetmatching>true</subsetmatching>
</payload>
<payload>
<value>57</value>
<phrase>Anger Management</phrase>
<subsetmatching>true</subsetmatching>
</payload>
<payload>
<value>56</value>
<phrase>Arrow</phrase>
<subsetmatching>true</subsetmatching>
</payload>
TvShowTitles.xml from xJSON
<payload>
<value>63</value>
<phrase>2 Broke Girls</phrase>
<subsetmatching>true</subsetmatching>
</payload>
<payload>
<value>64</value>
<phrase>Alphas</phrase>
<subsetmatching>true</subsetmatching>
</payload>
<payload>
<value>65</value>
<phrase>Anger Management</phrase>
<subsetmatching>true</subsetmatching>
</payload>
<payload>
<value>66</value>
<phrase>Arrow</phrase>
<subsetmatching>true</subsetmatching>
</payload>
It's got me confused...
-
If you are getting different IDs then most likely your xSQL settings are targeting the wrong .db files. You are either looking in the wrong folder, or you are not using the latest versions of the files (highest number at the end of the file name). My guess is that this is what is happening. The default settings in the plugin used the standard filenames for Frodo 1.0 but later versions of Frodo may have incremented the file numbers.
-
well found my mistake.
xSQL was set to one database and xJSON was grabbing data from which ever XBMC it was connected to at the time.
what a noob!
and 2 Broke Girls rocks!, well enough for a half hour entertainment anyway.