Subtitle delay custom command

Hi all,

This question has been posted before, but no real answer was given, so I tried to solve it miself (and failed).

The thing is that I want to create custom commands for the SubtitleDelayMinus and SubtitleDelayPlus commands. I know that this functions are available through the now playing panel, but this prevents me to use the remote control panel, whicht I find more comfy.

So I tried to create a custom command, but unfortunately nothing have worked so far. I have set the “q” key for the SubtitleDelayMinus command, and the “w” key for the SubtitleDelayPlus, by adding the lines

<q>SubtitleDelayMinus</q>
<w>SubtitleDelayPlus</w>

to my keymap.xml file. It works flawlessly using the physical keyboard.

Now, I’ve tried creating a Custom Command in Yatse using the three possible methods. The easiest option should be adding from media center as a keyboard key. So I’ve tried to add a q, and also its key code, 61521. No luck.

Next I tried to add it as a built-in command, (ACTION_SUBTITLE_DELAY_MIN) (I guessed), but nothing happened.

Finally, out of despair, I’ve tried with JSON-RPC, using the Input.ExecuteAction method and {subtitledelayminus} as a parameter, but this neither works.

I don’t know if if’ve done something wrong, but it shouldn’t be so difficult to pass a single keypress to Kodi.

At this point, I need help, or at least I would like to know what’s going on here. Can anyone help?

Thanks!

Welcome to Kodi and it’s million ways to do the same thing but not actually the same thing depending on so many factors :slight_smile:

Anyway the simplest is to create a BuiltInCommand and use Action(subtitledelayminus) The Input.ExecuteAction also works and you probably entered wrong values parameter is more complicated than just the value.

But I do not understand your first issue about now playing and not being able to use the remote panel. Both are always accessible from anywhere. And you usually do not need the remote part when there’s a media playing specially if it’s video as there’s subtitles.

Hi, and thank you for your answer,

After further research, and for those interested, I’ve managed to accomplish what I needed by using JSON-RPC, the Input.ExecuteAction method with {“action”:“subtitledelayminus”} as a parameters.

But I still feel that’s something wrong with the built-in commands, as none of them work. For instance, the built-in ActivateWindow(SubtitleSearch) command does not work, whereas the JSON method GUI.ActivateWindows {“window”:“subtitlesearch”} does.

I’ve solved my problem now, but maybe you can check this because, in my experience, only JSON methods and a handful of imported commands, like the numpad, work.

As for using the remote versus the now playing panel, I find the remote waaay more confortable and versatile than now playing, because with the remote I can control all Kodi, not just the video player. So it’s not a problem of availability, but a matter of convinience.

@Starbuck You probably have a non working Event Server and the use EventServer option is disabled on Yatse host settings.

If you had provided the mandatory logs I could have told you :wink:

I still do not understand your need about the remote screen, when you are looking at a video and want to configure subtitles you do not need the remote screen at all. Anyway I suppose you have habits you don’t want to change, but the now playing is made to have everything related to now playing faster than using the remote screen and always available.
Anyway I won’t insist as you probably won’t explain more, but opening remote or now playing is the same amount of clicks

Yes, this was the simple answer, the EventServer option was disabled in Yatse’s host setup.

Anyhow, I now know how to use properly the JSON methods, so hopefully someone will find this thread useful. :smiley:

Thank you!