Skip to content

Commit 78f9acc

Browse files
committed
Hack: Enable handling for the Kodi select dialog during video playback to enable 3D mode selection - #92
1 parent 2d50b53 commit 78f9acc

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

lib/windows/seekdialog.py

+21
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ def onReInit(self):
183183
self.updateProgress()
184184

185185
def onAction(self, action):
186+
if xbmc.getCondVisibility('Window.IsActive(selectdialog)'):
187+
if self.doKodiSelectDialogHack(action):
188+
return
189+
186190
try:
187191
self.resetTimeout()
188192

@@ -293,6 +297,23 @@ def onAction(self, action):
293297

294298
kodigui.BaseDialog.onAction(self, action)
295299

300+
def doKodiSelectDialogHack(self, action):
301+
command = {
302+
xbmcgui.ACTION_MOVE_UP: "Up",
303+
xbmcgui.ACTION_MOVE_DOWN: "Down",
304+
xbmcgui.ACTION_MOVE_LEFT: "Right", # Not sure if these are actually reversed or something else is up here
305+
xbmcgui.ACTION_MOVE_RIGHT: "Left",
306+
xbmcgui.ACTION_SELECT_ITEM: "Select",
307+
xbmcgui.ACTION_PREVIOUS_MENU: "Back",
308+
xbmcgui.ACTION_NAV_BACK: "Back"
309+
}.get(action.getId())
310+
311+
if command is not None:
312+
xbmc.executebuiltin('Action({0},selectdialog)'.format(command))
313+
return True
314+
315+
return False
316+
296317
def onFocus(self, controlID):
297318
if controlID == self.MAIN_BUTTON_ID:
298319
self.selectedOffset = self.trueOffset()

resources/skins/Main/1080i/script-plex-seek_dialog.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<onclick condition="String.IsEmpty(Window.Property(button.seek))">SetProperty(show.OSD,1)</onclick>
2121
</control>
2222
<control type="group" id="802">
23-
<visible>[!String.IsEmpty(Window.Property(show.OSD)) | Window.IsVisible(seekbar) | !String.IsEmpty(Window.Property(button.seek))] + !Window.IsVisible(osdvideosettings) + !Window.IsVisible(osdaudiosettings) + !Window.IsVisible(subtitlesearch) + !Window.IsActive(playerprocessinfo)</visible>
23+
<visible>[!String.IsEmpty(Window.Property(show.OSD)) | Window.IsVisible(seekbar) | !String.IsEmpty(Window.Property(button.seek))] + !Window.IsVisible(osdvideosettings) + !Window.IsVisible(osdaudiosettings) + !Window.IsVisible(subtitlesearch) + !Window.IsActive(playerprocessinfo) + !Window.IsActive(selectdialog)</visible>
2424
<animation effect="fade" time="200" delay="200" end="0">Hidden</animation>
2525
<control type="group">
2626
<visible>String.IsEmpty(Window.Property(settings.visible)) + [Window.IsVisible(seekbar) | Window.IsVisible(videoosd) | Player.ShowInfo]</visible>
@@ -180,7 +180,7 @@
180180
</control>
181181
</control>
182182
<control type="group" id="801">
183-
<visible>!String.IsEmpty(Window.Property(show.OSD)) + !Window.IsVisible(osdvideosettings) + !Window.IsVisible(osdaudiosettings)</visible>
183+
<visible>!String.IsEmpty(Window.Property(show.OSD)) + !Window.IsVisible(osdvideosettings) + !Window.IsVisible(osdaudiosettings) + !Window.IsActive(selectdialog)</visible>
184184
<animation effect="fade" time="200" delay="200" end="0">Hidden</animation>
185185
<control type="group" id="300">
186186
<visible>!String.IsEmpty(Window.Property(has.bif)) + [Control.HasFocus(100) | Control.HasFocus(501) | !String.IsEmpty(Window.Property(button.seek))]</visible>

0 commit comments

Comments
 (0)