Beta Advanced Emulator Launcher - Multi-emulator frontend for Kodi
(2017-10-30, 15:39)crono141 Wrote: Thanks. If I understand correctly the only portion of that script that I need to quit Kodi is the kodi_rpc function definition, and then the line that calls it with Application.Quit?

Exactly. If you just want to exit Kodi then you need

Code:
kodi_rpc()
{
    METHOD="$1"
    json_str="{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"method\":\"$METHOD\"}\""
    curl -H "Content-type: application/json" -d "$json_str" http://localhost:8080/jsonrpc
}

kodi_rpc "Application.Quit"

Note that you need to have the curl command installed. Curl is a very standard and basic command so I think it is present even in LibreELEC.

If you do not want to use kodi_rpc_notification and kodi_rpc_params then you don't need to include the function definition code in the script. kodi_rpc_notification is nice because if something is wrong the script is able to display a notification in Kodi.
Reply


Messages In This Thread
RE: Advanced Emulator Launcher - Multi-emulator frontend for Kodi - by Wintermute0110 - 2017-10-30, 16:03
Can You create A Sub Category? - by Wild_Tom - 2020-07-13, 04:43
Crash & Lost my launchers? - by eirrocmh - 2020-11-29, 02:25
RE: Crash & Lost my launchers? - by eirrocmh - 2020-12-19, 00:19
Logout Mark Read Team Forum Stats Members Help
Advanced Emulator Launcher - Multi-emulator frontend for Kodi12