Kodi Community Forum
v20 JSON-RPC Player.SetSubtitle params enable:false not working - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: v20 JSON-RPC Player.SetSubtitle params enable:false not working (/showthread.php?tid=372560)



JSON-RPC Player.SetSubtitle params enable:false not working - paul.j.ghosh - 2023-03-17

Attempted several times and I cannot get it to work.  Looking for confirmation that it is a bug.

this works:
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Player.SetSubtitle","params":{"playerid":%d,"subtitle":%d,"enable":true},"id":2}' %(_player_id, _preferred_subtitle_index))

this does not:
xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Player.SetSubtitle","params":{"playerid":%d,"subtitle":%d,"enable":false},"id":2}' %(_player_id, _preferred_subtitle_index))


RE: JSON-RPC Player.SetSubtitle params enable:false not working - izprtxqkft - 2023-03-17

take a look at this - https://forum.kodi.tv/showthread.php?tid=365836


RE: JSON-RPC Player.SetSubtitle params enable:false not working - paul.j.ghosh - 2023-03-17

Thanks!  I had read that post earlier and have implemented a similar workaround.  I am looking for confirmation that there is indeed a bug such that I can open one on github - if permitted.


RE: JSON-RPC Player.SetSubtitle params enable:false not working - crawfish - 2023-03-23

If you have any interest in the delay issue, I did open a ticket on github:

https://github.com/xbmc/xbmc/issues/21086

To me, the really interesting thing is that external subs don't incur the delay, as I found out some time later and commented on:

"I've just played my first files with external .srt subtitles, one forced, the other not. Kodi Nexus Alpha switches between the two without delays. However, the files I described in my OP still incur the delay. Can anyone explain the discrepancy, why external text subtitles perform as desired, and internal text subtitles do not?"


RE: JSON-RPC Player.SetSubtitle params enable:false not working - paul.j.ghosh - 2023-03-24

wadeysay: What Did They Say?

addon posted: 372702 (thread)


RE: JSON-RPC Player.SetSubtitle params enable:false not working - crawfish - 2023-03-27

(2023-03-24, 20:01)paul.j.ghosh Wrote: wadeysay: What Did They Say?

addon posted: 372702 (thread)

Looks very interesting! I've been doing "What did he say" in Autohotkey for a few years with an MCE receiver to handle my remote, but a real addon is obviously more general and preferable. It looks like you're handling the situation with forced subtitles, that is switching to a non-forced (preferably default) sub in the user language. When the timer runs out and you switch back to forced, do you get the 10 second delay before they start to appear again? This occurs with embedded subs and was the point of my github ticket. This also affects my implementation of "toggle subtitles" in AHK when switching between forced and normal subs, so I'd be interested if anyone found a fix for this.


RE: JSON-RPC Player.SetSubtitle params enable:false not working - paul.j.ghosh - 2023-03-27

@crawfish - have you tried the addon to see if it behaves the same way?