2010-03-31, 14:25
Hey,
Great to see an overhaul being made of the Web API. I'm a little late to the party it seems, but the progress made on the JSON interface looks nice and clean!
I spent about 30 minutes with it on the iPhone remote, just starting down the path of implementing a few basic calls and in that time came across some things I found / had thoughts on:
URL
- Found the URL has to be /jsonrpc rather than /jsonrpc/ . Though when accessing either from the web browser as a GET it gives a 'File not found' error. Be nice we could access from either both paths or /jsonrpc gave an error to suggest it's the correct one to hit but requires POST data to submit. Just took me a couple of mins to figure out why I was getting no response,
System.GetInfo
- Is this intended to be synonymous with the HTTP API GetSystemInfo ?
- Wondering if there is any way to get the info we used to be able to get from the GetSystemInfo command (maybe with a seperate command), such as the XBMC version and shuffle state (though see next point).
Playlist.XXX
- Can we get some methods to get the playlist state ? Such as Shuffle and Repeat status.
MusicLibrary.GetGenres
- Can this be implemented ?
MusicLibrary.GetArtists
- Crashing when passing genreid (if assuming I'm doing the correct thing)
Cheers,
Dave Fumberger.
Great to see an overhaul being made of the Web API. I'm a little late to the party it seems, but the progress made on the JSON interface looks nice and clean!
I spent about 30 minutes with it on the iPhone remote, just starting down the path of implementing a few basic calls and in that time came across some things I found / had thoughts on:
URL
- Found the URL has to be /jsonrpc rather than /jsonrpc/ . Though when accessing either from the web browser as a GET it gives a 'File not found' error. Be nice we could access from either both paths or /jsonrpc gave an error to suggest it's the correct one to hit but requires POST data to submit. Just took me a couple of mins to figure out why I was getting no response,
System.GetInfo
- Is this intended to be synonymous with the HTTP API GetSystemInfo ?
- Wondering if there is any way to get the info we used to be able to get from the GetSystemInfo command (maybe with a seperate command), such as the XBMC version and shuffle state (though see next point).
Playlist.XXX
- Can we get some methods to get the playlist state ? Such as Shuffle and Repeat status.
MusicLibrary.GetGenres
- Can this be implemented ?
MusicLibrary.GetArtists
- Crashing when passing genreid (if assuming I'm doing the correct thing)
Code:
{"jsonrpc":"2.0","params":{"genreid":"6"},"id":"1","method":"MusicLibrary.GetArtists"}
Code:
Thread 5 Crashed:
0 libSystem.B.dylib 0x97cfa732 __kill + 10
1 libSystem.B.dylib 0x97cfa724 kill$UNIX2003 + 32
2 libSystem.B.dylib 0x97d8d98d raise + 26
3 libSystem.B.dylib 0x97da39d9 __abort + 124
4 libSystem.B.dylib 0x97da3a55 abort_report_np + 0
5 libstdc++.6.dylib 0x94001fda __gnu_cxx::__verbose_terminate_handler() + 433
6 libstdc++.6.dylib 0x9400017a __cxxabiv1::__terminate(void (*)()) + 10
7 libstdc++.6.dylib 0x940001ba __cxxabiv1::__unexpected(void (*)()) + 0
8 libstdc++.6.dylib 0x940002b8 __gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) + 0
9 com.teamxbmc.xbmc 0x0087286f Json::Value::asInt() const + 271
10 com.teamxbmc.xbmc 0x00884a2a JSONRPC::CMusicLibrary::GetArtists(CStdStr<char> const&, JSONRPC::ITransportLayer*, JSONRPC::IClient*, Json::Value const&, Json::Value&) + 186
Cheers,
Dave Fumberger.