Kodi Community Forum

Full Version: JSON-RPC Player.SetSubtitle params enable:false not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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))
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.
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?"
wadeysay: What Did They Say?

addon posted: 372702 (thread)
(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.
@crawfish - have you tried the addon to see if it behaves the same way?