JSON-RPC ov TCP and boolean parameter
#1
I'm using the JSON-RPC interface over port 9090, and it's working great.
However, I'm having trouble trying to send it a boolean parameter.

Here is the full call:
Code:
{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "smb://share/folder", "media": "video", "recursive": true}, "id": "1"}
The problem is that the true parameter for "recursive" is not in quotes, and this throws a parse error.
So I put in in quotes, which gets rid of the parse error, but the directory is NOT recursively scanned. This makes me believe that XBMC does not think of a "true" in quotes as a boolean true.

I've also tried it as "true" and as "TRUE".

Any ideas on what I'm doing wrong?
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#2
I just ran your request (replaced your path with a real path on my machine) both over TCP and HTTP and I did not get a parse error and everything worked fine (got a list of all video files in the provided directory). There is no need to put quotes around the boolean value "true" as quotes indicate a string. Can you enable debug logging in XBMC and then pastebin your log file as it should contain the received request if there is a parse error.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
I just ran the request again. It worked this time - no parse error.
I must have fat-fingered it previously. My fault.
You are correct, no quotes needed for boolean value.

Thanks!
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#4
Montellese Wrote:I just ran your request (replaced your path with a real path on my machine) both over TCP and HTTP and I did not get a parse error and everything worked fine (got a list of all video files in the provided directory).

Did you get a recursive listing? I am still not getting a recursive listing. I only get the directories directly beneath the location i provide. It does not go any deeper, even though there are more folders/files below them.

The command does not show up in the debug log, so I can't get anywhere from that route.
Any ideas?
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply
#5
bradvido88 Wrote:Did you get a recursive listing? I am still not getting a recursive listing. I only get the directories directly beneath the location i provide. It does not go any deeper, even though there are more folders/files below them.
No I don't get a recursive listing. Please create a bug ticket for this so it won't be forgotten.

bradvido88 Wrote:The command does not show up in the debug log, so I can't get anywhere from that route.
It only shows up in the log if there is an error.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#6
Montellese Wrote:No I don't get a recursive listing. Please create a bug ticket for this so it won't be forgotten.
Here it is: http://trac.xbmc.org/ticket/11209
XBMC.MyLibrary (add anything to the library)
ForTheLibrary (Argus TV & XBMC Library PVR Integration)
SageTV & XBMC PVR Integration
Reply

Logout Mark Read Team Forum Stats Members Help
JSON-RPC ov TCP and boolean parameter0