Surely that exists??
Does any one know? Ive seen some documents and theres about 10 key presses to turn them off! Crazy.
Thanks
Surely that exists??
Does any one know? Ive seen some documents and theres about 10 key presses to turn them off! Crazy.
Thanks
If using an OSMC remote you could remap an existing button to the Subtitles on/off key, but then you lose the original function of that key. If using another remote with an available âfreeâ button you could add that function to the button. The keyboard âtâ key is what youâre looking for.
It takes a bit of reading to understand how to do it manually but itâs actually pretty easy.
Kodi Keymap
But if you install the Kodi addon called Keymap Editor you can do it from the comfort of your couch.
Cheers
Robert
Hi there, im going to turn it on and off using a home automation system, so i jjust need to know the command.
inputaction I believe is what ill send, just not sure on the commandâŚ
Doesnât look good unless things have changed outside this thread.
https://forum.kodi.tv/showthread.php?tid=107522
While subtitle on/off is T
so if you can sent T
via openhub it should work
Thanks, Ill see what I can find in the way of sending key strokesâŚ
It looks like json does support Subtitles: https://kodi.wiki/view/JSON-RPC_API/v4#Player.SetSubtitle
Has examples for turning subtitles on/off.
Here is a simple curl command you can run:
Subs on:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"Player.SetSubtitle","params":{"playerid":1,"subtitle":"on"}}' http://ip.of.osmc.system:8080/jsonrpc
Off:
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"Player.SetSubtitle","params":{"playerid":1,"subtitle":"off"}}' http://ip.of.osmc.system:8080/jsonrpc
You may need to change the port from 8080 to what ever your Kodi is configured to use.
That appears to have worked at least via CLI, ill test it when Iâm home.
kris@openhab2:/etc/openhab2$ curl -X POST -H âContent-Type: application/jsonâ -d â{âjsonrpcâ:â2.0â,âidâ:1,âmethodâ:âPlayer.SetSubtitleâ,âparamsâ:{âplayeridâ:1,âsubtitleâ:âoffâ}}â http://192.168.0.12:8080/jsonrpc
{âidâ:1,âjsonrpcâ:â2.0â,âresultâ:âOKâ}kris@openhab2:/etc/openhab2$
GET\x20jsonrpc?request={"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"showsubtitles"}}
This is the string from my control system
Thanks guys. Got it working with api and json