API XBMC
#1
Hello everyone, I stumble on a problem for days without finding the solution. I would like to extend my personal Android app to control my XBMC (I have 2 running on Raspberry Pi). For this I need to order by said XBMC HTTP queries. And I do not find the exact form for launch a film on my nas at \\nas_reseau\Films\11_6.mp4 (I do not want to go through a playlist or by file ID but by the file path). I tried the command :

http://admin:[email protected]:7852/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"\\nas_reseau\Films\11_6.mp4"}}}

but it didn't work. What should I do ? Thank you in advance for your help and sorry for the bad french-english google traduction Confused Blush.

Good day.

Emmanuel.
Reply
#2
You need to escape the backslashes so your "file" parameter should look like this:
Code:
"file": "\\\\nas_reseau\\Films\\11_6.mp4"

And please post a debug log and the response from XBMC next time. "it didn't work" is not a very useful error description.
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
It does not work too. The error message is :

{"error":{"code":-32602,"message":"Invalid params."},"id":"1","jsonrpc":"2.0"}

And with the original command it was :

{"error":{"code":-32700,"message":"Parse error."},"id":null,"jsonrpc":"2.0"}
Reply
#4
Yes the original error message told you that something was wrong with the format of your request. Now the error message tells you that the path doesn't work. Is the file you are trying to play part of one of your sources? If not, you can't play it through JSON-RPC.
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
#5
OK thanks, we are on the way Blush

What do you mean with "Is the file you are trying to play part of one of your sources?". If I understood, the file I try to play is in a folder that appear (the folder and the file) when I navigate in XBMC, yes.
Reply
#6
Do you actually have the path "\\nas_reseau\Films\" or is it the more likely smb://nas_reseau/Films/ ?

This is where a Debug Log is useful. Navigate to said file while debug logging is enabled and take a look through the log to get the correct path.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
We don't support unc paths internal anymore and should use url style paths like smb://. But dunno what happens with old style paths in DB though.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
API XBMC0