@@ -24,6 +24,7 @@ def __init__(self, *args, **kwargs):
2424 self .video = kwargs .get ('video' )
2525 self .viaOSD = kwargs .get ('via_osd' )
2626 self .nonPlayback = kwargs .get ('non_playback' )
27+ self .roundRobin = kwargs .get ('round_robin' , True )
2728 self .lastSelectedItem = 0
2829
2930 if not self .video .mediaChoice :
@@ -46,7 +47,8 @@ def onAction(self, action):
4647 except :
4748 util .ERROR ()
4849
49- if action in (xbmcgui .ACTION_MOVE_UP , xbmcgui .ACTION_MOVE_DOWN ) and self .getFocusId () == self .SETTINGS_LIST_ID :
50+ if self .roundRobin and action in (xbmcgui .ACTION_MOVE_UP , xbmcgui .ACTION_MOVE_DOWN ) and \
51+ self .getFocusId () == self .SETTINGS_LIST_ID :
5052 to_pos = None
5153 last_index = self .settingsList .size () - 1
5254 if action == xbmcgui .ACTION_MOVE_UP and self .lastSelectedItem == 0 and self .settingsList .topHasFocus ():
@@ -179,6 +181,7 @@ def __init__(self, *args, **kwargs):
179181 self .choice = None
180182 self .nonPlayback = kwargs .get ('non_playback' )
181183 self .lastSelectedItem = self .selectedIdx if self .selectedIdx is not None else 0
184+ self .roundRobin = kwargs .get ('round_robin' , True )
182185
183186 def onFirstInit (self ):
184187 self .optionsList = kodigui .ManagedControlList (self , self .OPTIONS_LIST_ID , 8 )
@@ -194,7 +197,8 @@ def onAction(self, action):
194197 except :
195198 util .ERROR ()
196199
197- if action in (xbmcgui .ACTION_MOVE_UP , xbmcgui .ACTION_MOVE_DOWN ) and self .getFocusId () == self .OPTIONS_LIST_ID :
200+ if self .roundRobin and action in (xbmcgui .ACTION_MOVE_UP , xbmcgui .ACTION_MOVE_DOWN ) and \
201+ self .getFocusId () == self .OPTIONS_LIST_ID :
198202 to_pos = None
199203 last_index = self .optionsList .size () - 1
200204
0 commit comments