Swipe in Global Search

This commit is contained in:
Alhaziel01
2020-11-26 10:13:55 +01:00
parent ee11b037ab
commit fbdc50bc86
2 changed files with 56 additions and 116 deletions

View File

@@ -35,6 +35,8 @@ UP = 3
DOWN = 4
EXIT = 10
BACKSPACE = 92
SWIPEUP = 531
CONTEXT = 117
# Container
SEARCH = 1
@@ -369,7 +371,7 @@ class SearchWindow(xbmcgui.WindowXML):
def onAction(self, action):
action = action.getId()
focus = self.getFocusId()
if action in [117] and focus in [RESULTS]:
if action in [CONTEXT] and focus in [RESULTS]:
pos = self.RESULTS.getSelectedPosition()
name = self.CHANNELS.getSelectedItem().getLabel()
item = self.results[name][0][pos]
@@ -390,6 +392,9 @@ class SearchWindow(xbmcgui.WindowXML):
index = xbmcgui.Dialog().contextmenu(context)
if index > 0: xbmc.executebuiltin(context_commands[index])
elif action == SWIPEUP:
self.focusID(CHANNELS)
elif action in [LEFT, RIGHT] and focus in [CHANNELS]:
items = []
name = self.CHANNELS.getSelectedItem().getLabel()