I was wondering if there be a new version of your wrapper for the new JSON-RPC API?

Also i spent some time this morning looking at my issue with the wrong albums being returned by AudioLibrary->GetAlbums(), and i have to say i'm pretty confused as to what is going on, i honestly don't know how to proceed, as far as i can tell the problem must be coming from the JSON-RPC API but if that is the case why does it only happen to me??

If you have a moment or two could you look at the output and maybe make a comment?

My test library has 12 albums, first the result of a AudioLibrary->GetAlbums() call with no param:

Hey Midzai,
Thanks a lot for this. Has been working relatively well with one exception. I'm trying to get the Movie library in alphabetical order but for some reason no matter what params I use it only gives me the same order (not-alphabetical). Am I doing something wrong?

gugahoi Wrote:Hey Midzai,
Thanks a lot for this. Has been working relatively well with one exception. I'm trying to get the Movie library in alphabetical order but for some reason no matter what params I use it only gives me the same order (not-alphabetical). Am I doing something wrong?

gugahoi Wrote:No no there's no need for that. The correct syntax would be in this style

Code:

"sort": { "method": "videotitle" }

Ah excellent thanks for that. I really wish the JSON-RPC wiki was more informative!

Quote:Another question I had: is this compatible with Nightly builds? If not, do you plan on updating it at all?

Thanks!

My test system at work is currently XBMC PRE-10.5 r32807. I haven't tested against a more recent version yet, but I'll compile a nightly build and check things out. If it doesn't work I will be updating it so that it does, yes.

OK I compiled the latest nightly and found that the new RPC implementation did break the library but it was fairly trivial to fix. The new version in git supports both implementations, though you obviously would need to adjust the client code (eg the parameter format) if you want to support both implementations in your own apps. To that end, the *Client classes now have an isLegacy() method which you can call to find out which RPC implementation is being used and adjust accordingly. The example script has been updated to use this method.

Mindzai Wrote:OK I compiled the latest nightly and found that the new RPC implementation did break the library but it was fairly trivial to fix. The new version in git supports both implementations, though you obviously would need to adjust the client code (eg the parameter format) if you want to support both implementations in your own apps. To that end, the *Client classes now have an isLegacy() method which you can call to find out which RPC implementation is being used and adjust accordingly. The example script has been updated to use this method.

AWESOME! Thanks for such a quick response! Will test it out with some nightlies and see if they work as expected.