Solved Play smb PC file from command line or url - ... how? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: Solved Play smb PC file from command line or url - ... how? (/showthread.php?tid=366997) |
Play smb PC file from command line or url - ... how? - Maxol - 2022-02-11 Can you help me out playing a (video) file that is located on my PC on my EM7680 Kodi Player using a command line/url? Operating the player with the IR-remote is working flawlessly, including accessing the (samba) shares on my PC. The web interface is enabled and working too. In the web interface I see an url when browsing my shared folders (ip address and names are fake ;-) htp://192.178.118.217:8080/#browser/video/%3A%2F%2Fmypc%2FE%2FTV%2FSeries%2F3b%201992%2F I googled around and found the commands that can be used, like PlayFile and PlayerControl(Play), I also found an example from someone using xbmcCmds/xbmc but I have not been able to find the correct syntax. I tried all these commands in my browser but they all fail: htp://192.178.118.217:8080/xbmcCmds/xbmc?command=PlayFile(://mypc/E/TV/Series/3b 1992/S02E01.mkv) htp://192.178.118.217:8080/xbmcCmds/xbmc?command=PlayFile(%3A%2F%2Fmypc%2FE%2FTV%2FSeries%2F3b%201992%2FS02E01.mkv) htp://192.178.118.217:8080/xbmcCmds/xbmc?command=PlayFile(://mypc/E/TV/Series/3b%2F1992/S02E01.mkv) htp://192.178.118.217:8080/xbmcCmds/xbmc?command=PlayFile("://mypc/E/TV/Series/3b 1992/S02E01.mkv") htp://192.178.118.217:8080/xbmcCmds/xbmc?command=PlayFile(%22%3A%2F%2Fmypc%2FE%2FTV%2FSeries%2F3b%201992%2FS02E01.mkv%22) I simple Play command doesn't work either: htp://192.178.118.217:8080/xbmcCmds/xbmc?command=PlayerControl(Play) What am I doing wrong? Is the part after 8080 incorrect (the xbmcCmds/xbmc part) or something else? Any help is appreciated... note: I removed one t in each url to overcome the truncation of the lines so you can study the commands I used ;-) RE: Play smb PC file from command line or url - ... how? - Klojum - 2022-02-11 Isn't the Kore mobile phone app working for you? You should be able to control the EM7680 with it easily. xbmcCmds/xbmc sounds a bit outdated though. Which version of Kodi is on the EM7680 device?
RE: Play smb PC file from command line or url - ... how? - Maxol - 2022-02-12 (2022-02-11, 18:03)Klojum Wrote: Isn't the Kore mobile phone app working for you? You should be able to control the EM7680 with it easily. Chorus version 2.4.4 Kodi version 17.6 I'm not looking for an app on a mobile to control the EM7680. I want to be able to manually enter a command in an URL to control the player. RE: Play smb PC file from command line or url - ... how? - Maxol - 2022-02-12 I'm focusing on the PlayPause command now. If I can get that to work I can take it from there. I found JSON API commands, hoping that would work but no luck: 192.138.138.237:8080/{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 0 }, "id": 1} The result is: File not found RE: Play smb PC file from command line or url - ... how? - DarrenHill - 2022-02-12 From a Windows command prompt you can use something like Code: curl -X POST -H "content-type:application/json" http://kodi:[email protected]:80/jsonrpc -d {\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"Player.PlayPause\",\"params\":{\"playerid\":1}} suitably adjusted for your username and password, plus the IP address. You need to have remote control enabled within Kodi ( settings menu > service settings > control ) for on this system or other system , depending on where your Kodi install is compared to where the terminal is running. You also need remote control via http enabled on the same screen (that's where you set up username and password).The trick is to get all the escaping of the various commands right (mostly the quotes) which is where all the backslashes come from in the command. You can do similar from a url by extracting the relevant bit from the curl and doing it via a web browser. Of course that also needs the correct settings in Kodi as well, as described. RE: Play smb PC file from command line or url - ... how? - Maxol - 2022-02-12 RE: Play smb PC file from command line or url - ... how? - Maxol - 2022-02-13 Play smb PC file from command line or url - ... how? - DarrenHill - 2022-02-13 Thread marked solved. |