2010-04-09, 18:15
The JSON RPC Api hasn't been added to XBMC for XBOX yet, has it?
Bram77 Wrote:The JSON RPC Api hasn't been added to XBMC for XBOX yet, has it?
sWORDs Wrote:topfs2, would that mean that it wouldn't be hard to run JSON-RPC on live 9.11? Then I wouldn't have to run nightly builds or SVN.
topfs2 Wrote:Live is linux so just build latest svn over a live build and you'll have it (might exist ppa aswell, haven't checked tbh).
Quote:21:10:23 T:6472 M:1694167040 NOTICE: WebServer: POST | /jsonrpc
21:10:23 T:6472 M:1694167040 NOTICE: WebServer: POST | /jsonrpc
21:10:23 T:6472 M:1694167040 NOTICE: WebServer: POST | /jsonrpc
21:10:23 T:6472 M:1694167040 ERROR: JSONRPC: Failed to parse '{"id":1,"jsonrpc":"2.0","method":"JSONRPC.Ping"}'
Quote:21:08:18 T:572 M:1698738176 ERROR: Playlist Player: skipping unplayable item: 0, path [smb://NAS/Films4/_Films/Ast?rix aux jeux olympiques (Ast?rix aux jeux olympiques) [2008]/Ast?rix aux jeux olympiques.(2008).mkv]
Tolriq Wrote:Well since things advance here i try to complete Yatse for JSON
Version tested : SVN 29202
It seems it currently still not support UTF8 Encoded request :
Tolriq Wrote:And if i encode file in ascii, i can't start the XBMC.Play (using arg : file and the full filename) if the item contain accents .
It give :
Changing accent to ? so obviously won't work
Tolriq Wrote:And any ETA about VideoPlayer.SeekPercentage (and other players :p).
Tolriq Wrote:I have not tested yet the musiclibrary part but is full library get without passing argument implemented ? (to not have to list all artist then do 4000 other requests to get all data). (And genreid returned ?)
Tolriq Wrote:Edit : And i can't find a way to know if a player is actually playing or paused.
Tolriq Wrote:Edit2 : During my test, jsonrpc and webserver stopped to work after starting a movie :
log file : http://pastebin.com/Fc7a0hTB
topfs2 Wrote:I just reinstalled my machine, will try tommorrow but you could try adding a bit of spaces:
{ "jsonrpc": "2.0", "method": "JSONRPC.Ping", "id": 1 }
topfs2 Wrote:The one inside the play should be utf8. I've altered alot on the play method though but I'll try with the latest head when I have my dev machine running again
topfs2 Wrote:Will add tommorrow
topfs2 Wrote:GetSongs without artistid or albumid and fields for artist and album? Atleast I would think that should cover that need?
topfs2 Wrote:Yeah, thats on a "need-to-do"-basis if you pause it will return pause status though
topfs2 Wrote:Yeah nad noted that aswell, seems to be windows specific though. The whole network goes down, not sure if its jsonrpc or something else.
Tolriq Wrote:Well i'm using a framework (Jayrock) can't really control the spacing, but the same req encoded in ascii works perfectly.if that is a litteral request, ascii and utf-8 would be stored in 100% the same way.
public virtual object Invoke(Type returnType, string method, object args)
{
if (method == null)
throw new ArgumentNullException("method");
if (method.Length == 0)
throw new ArgumentException(null, "method");
if (returnType == null)
throw new ArgumentNullException("returnType");
var request = GetWebRequest(new Uri(Url));
request.Method = "POST";
using (var stream = request.GetRequestStream())
using (var writer = new StreamWriter(stream, Encoding.[b][size=large]UTF8[/size][/b]))
{
var call = new JsonObject();
call["id"] = ++_id;
call["jsonrpc"] = "2.0";
call["method"] = method;
if (args != null)
call["params"] = args;
JsonConvert.Export(call, writer);
}
using (var response = GetWebResponse(request))
using (var stream = response.GetResponseStream())
using (var reader = new StreamReader(stream, Encoding.UTF8))
return OnResponse(JsonText.CreateReader(reader), returnType);
}
public virtual object Invoke(Type returnType, string method, object args)
{
if (method == null)
throw new ArgumentNullException("method");
if (method.Length == 0)
throw new ArgumentException(null, "method");
if (returnType == null)
throw new ArgumentNullException("returnType");
var request = GetWebRequest(new Uri(Url));
request.Method = "POST";
using (var stream = request.GetRequestStream())
using (var writer = new StreamWriter(stream, Encoding.[b][size=large]ASCII[/size][/b]))
{
var call = new JsonObject();
call["id"] = ++_id;
call["jsonrpc"] = "2.0";
call["method"] = method;
if (args != null)
call["params"] = args;
JsonConvert.Export(call, writer);
}
using (var response = GetWebResponse(request))
using (var stream = response.GetResponseStream())
using (var reader = new StreamReader(stream, Encoding.UTF8))
return OnResponse(JsonText.CreateReader(reader), returnType);
}