Kodi Community Forum
"Browse for Subtitles" shortcut - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: "Browse for Subtitles" shortcut (/showthread.php?tid=306428)



"Browse for Subtitles" shortcut - bagheerah - 2017-02-09

First of all, I know the question is off-topic, but I have tried in the subtitles addon section and they couldn't help me there. If it needs be I will remove the post. Just know that I have tried lots of things before posting here.
Thanks in advance.
I am trying to map to a Key the "Browse for subtitles" window under video mode. Notice it is NOT the "Subtitle Search" window, which I have already mapped.
That window can be accessed through the Sound submenu in the fullscreen video OSD.
I have been trying to finde an action that summons that window and I have tried too to find that window name so can I can invoke it through "ActivateWindow(HowEverTheHellitisNamed)", but I haven't been able to find the slightest reference to it.
Please, does anyone know how to summon it?


RE: "Browse for Subtitles" shortcut - smitchell6879 - 2017-02-09

Can you post a screenshot just so we are clear on what your looking for?


RE: "Browse for Subtitles" shortcut - BigNoid - 2017-02-09

There's no direct way for that afaik. You could try mapping a button with actions in a sequence, like you would navigate with the remote:
Code:
<onclick>ActivateWindow(osdaudiosettings)</onclick>
<onclick>Action(down)</onclick>
....
<onclick>Action(select)</onclick>



RE: "Browse for Subtitles" shortcut - bagheerah - 2017-02-10

Ok, Thanks a lot. No wonder I couldn't find it. That should work.
I'll try this today.
Just one thing though: how do you join them, because I was adding at the keyboard.xml file a line such as:
<s>ActivateWindow(SubtitleSearch)</s>

But how do I chain several instructions, because adding a new line such as

<s>ActivateWindow(osdaudiosettings)</s>
<s>Action(down)</s>

would just reassign the key "s" to Action(down) and so on if I keep writing commands in such way
Is there a way to map a group of instruction to a key?


RE: "Browse for Subtitles" shortcut - ironic_monkey - 2017-02-10

you have to write a python script, then map to that.


RE: "Browse for Subtitles" shortcut - trogggy - 2017-02-10

(2017-02-10, 13:42)bagheerah Wrote: Ok, Thanks a lot. No wonder I couldn't find it. That should work.
I'll try this today.
Just one thing though: how do you join them, because I was adding at the keyboard.xml file a line such as:
<s>ActivateWindow(SubtitleSearch)</s>

But how do I chain several instructions, because adding a new line such as

<s>ActivateWindow(osdaudiosettings)</s>
<s>Action(down)</s>

would just reassign the key "s" to Action(down) and so on if I keep writing commands in such way
Is there a way to map a group of instruction to a key?
You can do it by mapping the remote to a python script that does the buttony stuff.
eg
Code:
xbmc.executebuiltin('ActivateWindow(osdaudiosettings)')
xbmc.executebuiltin( "XBMC.Action(Down)" )

No idea if there's a better way.


RE: "Browse for Subtitles" shortcut - ironic_monkey - 2017-02-10

i have opened https://github.com/xbmc/xbmc/pull/11649 to make it simpler in the future.


RE: "Browse for Subtitles" shortcut - BigNoid - 2017-02-10

(2017-02-10, 14:43)ironic_monkey Wrote: i have opened https://github.com/xbmc/xbmc/pull/11649 to make it simpler in the future.

Nice. Can we have one for the subtitle selection as well Smile


RE: "Browse for Subtitles" shortcut - ironic_monkey - 2017-02-10

that's trickier. it's managed by the settings dialog base, which means i'd have to manipulate dialog state from the outside, making protected data public and dig through the window manager to get at the dialog instance. it would be rather naughty to do so.


RE: "Browse for Subtitles" shortcut - Wanilton - 2017-02-10

One for audio track selection in fullscreen, will be great too, thanks ironic_monkey, great improvement.


RE: "Browse for Subtitles" shortcut - bagheerah - 2017-02-10

(2017-02-10, 14:46)BigNoid Wrote:
(2017-02-10, 14:43)ironic_monkey Wrote: i have opened https://github.com/xbmc/xbmc/pull/11649 to make it simpler in the future.

Nice. Can we have one for the subtitle selection as well Smile

Ok, I have tried to make some sense of the info in that link but I am very very out of my depth there.
However I am trying with the python file and here's what I have tried:

Keymap.xml line:
<key>XBMC.RunScript(C:\Test\BrowseSubtitles.py)</key>

and here are the contents of the py file:

import xbmc, xbmcgui


#sequence of actions

xbmc.executebuiltin('ActivateWindow(osdaudiosettings)')
xbmc.executebuiltin('XBMC.Action(up)')
xbmc.executebuiltin('XBMC.Action(up)')
xbmc.executebuiltin('XBMC.Action(select)')


And it works... Thanks a lot!!!!!!!!!!!!!!!!!Big Grin


RE: "Browse for Subtitles" shortcut - ironic_monkey - 2017-02-10

the link holds code changes so you can just map a key to 'BrowseSubtitle' in future versions (if it is accepted).


RE: "Browse for Subtitles" shortcut - pogo1975 - 2017-08-04

(2017-02-10, 16:18)ironic_monkey Wrote: the link holds code changes so you can just map a key to 'BrowseSubtitle' in future versions (if it is accepted).
Can you make similar modification for audio language ? it will help on addons like netflix where are several audio languages, and selecting between english and polish can be painfull.


RE: "Browse for Subtitles" shortcut - ironic_monkey - 2017-08-04

not sure what you are asking for ? if you are asking for a pop-up menu i have explained above why that is a bit hard to do. this had nothing to do with such functionality.


RE: "Browse for Subtitles" shortcut - TP.One - 2019-05-20

(2017-02-10, 14:43)ironic_monkey Wrote: i have opened 11649(PR) to make it simpler in the future.

Did this made it in to Master?

Did try "browsesubtitle" as this is, what was mentionen in the Pullrequest under "buttontranslator", but didnt work on my end. (Also didnt found this in the Wiki.)

What i try to achive is getting to the Selectdialog for (embeded) suptitles. (.mkv)