2013-09-12, 08:58
I just noticed that a path needs to be added as a source in XBMC's File Manager before JSON-RPC can access it. Is this by design or a bug? Add ons have access to these with out adding as sources
For example:
Fresh Install. All that shows up in File Manager is my Optical Drive.
If I issue the following command
I get the following error.
If I add the mapped drive 'T:\" as a source, the same query gives the proper result(it also happens on local drives as well)
If this is a bug, I'll post a Trac ticket. If it's by design, I'll just keep informing users of my add on to add their paths as sources.
For example:
Fresh Install. All that shows up in File Manager is my Optical Drive.
If I issue the following command
Code:
{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "T:\\Trailers\\", "media": "video"}, "id": 1}
Code:
{"error":{"code":-32602,"message":"Invalid params."},"id":1,"jsonrpc":"2.0"}
If I add the mapped drive 'T:\" as a source, the same query gives the proper result(it also happens on local drives as well)
Code:
{"id":1,"jsonrpc":"2.0","result":{"files":[{"file":"T:\\Trailers\\2013-02-04 The Lords of Salem (Trailer)\\","filetype":"directory","label":"2013-02-04 The Lords of Salem (Trailer)","type":"unknown"},{"file":"T:\\Trailers\\2013-02-04 Like Someone in Love (Trailer)\\","filetype":"directory","label":"2013-02-04 Like Someone in Love (Trailer)","type":"unknown"}],"limits":{"end":2,"start":0,"total":2}}}
If this is a bug, I'll post a Trac ticket. If it's by design, I'll just keep informing users of my add on to add their paths as sources.