StepBackTempSubs - Step/skip back/rewind and temporarily enable subtitles
#1
Works in Kodi 18/19
A very simple addon, inspired by the 4th gen Apple TV (Siri: "What did he say?"). It'll step back and temporarily enable subtitles.

Features
  • Step back X seconds (default 15 s).
  • Enable subtitles temporarily for Y seconds (default 25 s).
  • Option to step back even if subs are enabled (default disabled).
Download link: https://www.dropbox.com/s/5ko3fqd6l6xg6g...e.zip?dl=0

-Use Install from ZIP file.
-The addon is added under Program add-ons.
-Bind the addon to a key/button using the addon Keymap Editor or manually with the keyboard.xml file (see below).

Issues
  • Every time the script toggles the subtitles the notification will show, "Subtitles English/Disabled". I haven't found a way to disable it temporarily, only permanently for everything which I don't think anybody wants. Though if you don't care about getting any notifications from Kodi just rename DialogKaiToast.xml, e.g. DialogKaiToast.xml.bak

Bind the addon to a key
Create a file called keyboard.xml in %APPDATA%\kodi\userdata\keymaps\ e.g.
C:\Users\yourusername\AppData\Roaming\Kodi\userdata\keymaps\
(http://kodi.wiki/view/Userdata)

E.g. in this case bound to the F1 key.
 
Code:
<keymap>
<fullscreenvideo>
<keyboard>
<f1>RunScript(C:\Users\yourusername\AppData\Roaming\Kodi\addons\script.stepbacktempsubs\default.py)</f1>
</keyboard>
</fullscreenvideo>
</keymap>
Check here if you want to check how to fine tune were the script is active. If you use global instead of fullscreenvideo it'll work anywhere if the video is playing in the background (e.g. Home screen).
Reply
#2
[1.2]
Update to work with both Kodi 18 and 19.

[1.1]
Redid original functionality using xbmc.getCondVisibility.
*Only toggle if subs are disabled.
*Option to rewind even if subs are enabled.

[1.0]
Removed a bunch of code because of changes from Kodi 17 to 18.
In 18+ the VideoPlayer.SubtitlesLanguage always has the value of the subtitle selected in the dropdown list in Kodi settings (OSD>Subtitles>Subtitle settings>Subtitle). It doesn't matter if subtitles are enabled or not.
So to only rewind if subtitles are disabled doesn't work anymore. It'll always rewind.
Also, the language settings/code was only meaningful for the above reason. The script didn't actually change to language X from addon settings if language Y was selected in Kodi settings.

The only difference from before is that you can't have one key for rewind X s and stepbacktempsubs as then you'll instead disable subs for Y s.

[0.3.7]
Minor cosmetic configure changes and typos fixed.

[0.3.6]
Nothing really changed feature wise. Though now it's all in one proper addon in a ZIP with addon.xml and settings.xml
Reply

Logout Mark Read Team Forum Stats Members Help
StepBackTempSubs - Step/skip back/rewind and temporarily enable subtitles0