[Feature Request] Hotkeys for Audio and Subtitle Lists
#1
I think Hotkeys for Audio List (audio streams) and Subtitle Lists - is a Must-have feature.
Right now to change subtitles I have to press M-key to bring up Player controls (OSD) and then press 16 (!) times to open Subtitle menu. Very annoying =(

Image

So, how about
A key = Audio Streams (Audio Streams is much more important than Audio delay control I think)
L key = Subtitle Lists

PS: Many thanks for Audio and Subtitle Lists!
Reply
#2
Use the builtin functions

ShowSubtitles or NextSubtitle

A single click of the remote or keyboard
Reply
#3
(2015-04-06, 09:41)FishOil Wrote: Use the builtin functions

ShowSubtitles or NextSubtitle

A single click of the remote or keyboard
Like this?

Image

Current cyclic switching through audio streams/subtitles is extremely inconvenient for me.
That is why now we have Audio and Subtitle Lists in Kodi 15.0 Isengard – Alpha 2

Quote:Many BluRay movies include a large number of audio and subtitle streams to choose from, including numerous director’s commentaries, alternative language tracks, etc. In the past, the user was forced to to slowly scroll through them, one item at a time, using something called a software spinner. Now, these streams are listed as one big list, so the user can easily find and select exactly the stream they are looking for.
http://kodi.tv/kodi-15-0-isengard-alpha-2/

It would be awesome to have a hotkey to bring up streams/subtitles menu.

Image
Reply
#4
Sorry, but excuse my ignorance, what is the difference?
Current way you cycle through built in function using a defined key till you get the required sub/audio stream
Proposed way you cycle through the list using arrow keys till you get to the required sub/audio stream and select


They both require you to cycle through sub/audio? (I might be wrong)
Reply
#5
You will need to find the window ID and use for example ActivateWindow(10124) <--- 10124 is the audio settings window id

But, As noted above I dont see the advantage as you still need to cycle with any method you choose.
Reply
#6
(2015-04-08, 07:49)k4sh1n Wrote: Sorry, but excuse my ignorance, what is the difference?

(2015-04-08, 08:27)FishOil Wrote: But, As noted above I dont see the advantage as you still need to cycle with any method you choose.

The difference is huge!

The advantages of subs|audio lists:

1. User can see list of all available subs/audio streams at once (in most cases) and thus it is possible to quickly and easily navigate through them.
2. It is possible to select items in both directions.
3. And L-key (Next subtitle) is not even real menu, just an OSD information. And its only function is to choose next subtitle, while I want to see all subs and select the one I want as quickly as possible.
4. BTW, there is no hotkey for Audio Streams at all.

I think it was very well explained in the Blogpost:
Quote:Many BluRay movies include a large number of audio and subtitle streams to choose from, including numerous director’s commentaries, alternative language tracks, etc. In the past, the user was forced to to slowly scroll through them, one item at a time, using something called a software spinner. Now, these streams are listed as one big list, so the user can easily find and select exactly the stream they are looking for.
http://kodi.tv/kodi-15-0-isengard-alpha-2/
Reply
#7
I guessing most of us exclude unneeded subtitle tracks when we rip content.
Reply
#8
(2015-04-10, 05:05)Ned Scott Wrote: I guessing most of us exclude unneeded subtitle tracks when we rip content.

There are many people who watch original content (not rips), I guess.
Reply
#9
I made a python script

subtitle.py
Code:
import xbmc

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

audio.py
Code:
import xbmc

xbmc.executebuiltin('ActivateWindow(osdaudiosettings)')
xbmc.executebuiltin("Action(down)")
xbmc.executebuiltin("Action(down)")
xbmc.executebuiltin("Action(down)")
xbmc.executebuiltin("Action(select)")

so each script needs to be created and named (i.e subtitle.py and audio.py) then place both scripts in userdata folder
(i.e. in openelec mine is /storage/.xbmc/userdata) (you might need to find it)

you'll need to bind a code like this to a key
Code:
RunScript(/storage/.xbmc/userdata/audio.py)

for example (since your using the letter m I'm assuming your using a keyboard)

you need to (if you don't already have one) create a keyboard.xml

and inisde the keyboard.xml you'll have

Code:
<keymap>
  <FullscreenVideo>
    <keyboard>
      <n>RunScript(/storage/.xbmc/userdata/audio.py)</n>
      <b>RunScript(/storage/.xbmc/userdata/subtitle.py)</b>
    </keyboard>
  </FullscreenVideo>
</keymap>

if you already have a keyboard.xml then just place
Code:
<n>RunScript(/storage/.xbmc/userdata/audio.py)</n>
      <b>RunScript(/storage/.xbmc/userdata/subtitle.py)</b>
between fullscreenvideo

this keyboard.xml needs to be placed inside keymaps (/storage/.xbmc/userdata/keymaps)
note you can change what letter you chose to bind those scripts. It's the best I can do. let me know if you get stuck
(you'll need to reboot once for the changes to take effect)
Reply
#10
(2015-04-10, 20:47)MediaPi Wrote: I made a python script

Thanks!
Reply
#11
did it work? I'm just learning about python scripts so I didn't really get to test it out. did you keep the n and b keys?

you can also modify the script to pause the video while you search for audio/subtitle but having this command at the beginnning of each scripts

Code:
xbmc.executebuiltin("Action(Play)")

so you would get something like this for subtitle.py


Code:
import xbmc

xbmc.executebuiltin("Action(Play)")
xbmc.executebuiltin('ActivateWindow(osdaudiosettings)')
xbmc.executebuiltin("Action(up)")
xbmc.executebuiltin("Action(up)")
xbmc.executebuiltin("Action(up)")
xbmc.executebuiltin("Action(select)")


you can do the same for audio.py
I personally would do that so I don't miss anything Smile
Reply
#12
I've not tried this script but don't see why is won't work if the other one did

create this script

enter.py
Code:
import xbmc

xbmc.executebuiltin("Action(select)")
xbmc.executebuiltin("Action(back)")
xbmc.executebuiltin("Action(Play)")

name it enter.py and place in same place as other scripts (userdata folder)

now your keyboard.xml should look like this (the code from below plus new code)

Code:
<keymap>
  <FullscreenVideo>
    <keyboard>
      <n>RunScript(/storage/.xbmc/userdata/audio.py)</n>
      <b>RunScript(/storage/.xbmc/userdata/subtitle.py)</b>
    </keyboard>
  </FullscreenVideo>
  <osdaudiosettings>
    <keyboard>
      <enter mod="shift">RunScript(/storage/.xbmc/userdata/enter.py)</enter>
    </keyboard>
  </osdaudiosettings>
</keymap>

now instead of pressing enter, press shift+enter and the script will press select get rid of the menu and start the movie again (assuming you added the play command to the other scripts)Big Grin

let me know if it worked :p

EDIT just realised you wanted L and A keys for audio and subtitle, your keyboard.xml file should be like this

Code:
<keymap>
  <FullscreenVideo>
    <keyboard>
      <a>RunScript(/storage/.xbmc/userdata/audio.py)</a>
      <l>RunScript(/storage/.xbmc/userdata/subtitle.py)</l>
    </keyboard>
  </FullscreenVideo>
  <osdaudiosettings>
    <keyboard>
      <enter mod="shift">RunScript(/storage/.xbmc/userdata/enter.py)</enter>
    </keyboard>
  </osdaudiosettings>
</keymap>

this should overide the other assigned keys and I just checked and you won't be using them
<l>NextSubtitle</l>
<a>AudioDelay</a>

you could if you wanted to use a modifier such as control so your commands will be like

<a mod="ctrl">RunScript(/storage/.xbmc/userdata/audio.py)</a>

this way you won't lose a and l. well python scripting (at this level, which is the only level I know) isn't to bad, its just macros.
let me know how it went I'm curious if it workd
Reply
#13
(2015-04-11, 01:41)MediaPi Wrote: did it work?
I haven't tried it yet. I wonder, will it instantly open subs|audio streams window only (without Player controls (OSD) and Audio & Subs settings window)?
Reply
#14
yes it lauches the audio settings window, then cycles up (or down) to the required field and presses enter, it won't look as pretty as if there was just one window but even on a Pi its a fraction of a second delay then you have the options, make sure to include the play command so it pauses, you are using a keyboard right

edit so to answer your last question, it will open audio and subs settings window but before you have a chance to look at that window it will open the option window and then the last script I made should close it with one key combination, so its basically what you wanted just not as nice
Reply
#15
Nice work MediaPi
Reply

Logout Mark Read Team Forum Stats Members Help
[Feature Request] Hotkeys for Audio and Subtitle Lists2