Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
"Browse for Subtitles" shortcut
#1
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?
Reply
#2
Can you post a screenshot just so we are clear on what your looking for?
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#3
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>
Reply
#4
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?
Reply
#5
you have to write a python script, then map to that.
Reply
#6
(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.
Reply
#7
i have opened https://github.com/xbmc/xbmc/pull/11649 to make it simpler in the future.
Reply
#8
(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
Reply
#9
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.
Reply
#10
One for audio track selection in fullscreen, will be great too, thanks ironic_monkey, great improvement.
MediaBrazil forum Website - Youtube Channel
MQ9-1.6.0.29 - 09.15.2023 - Aeon MQ Skin Team
MarcosQui Website Donate and support us.
Reply
#11
Wink 
(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
Reply
#12
the link holds code changes so you can just map a key to 'BrowseSubtitle' in future versions (if it is accepted).
Reply
#13
(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.
Reply
#14
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.
Reply
#15
(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)
Reply

Logout Mark Read Team Forum Stats Members Help
"Browse for Subtitles" shortcut0