+3
-7
@@ -359,15 +359,9 @@ def viewmodeMonitor(monitor):
|
||||
win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
|
||||
currentMode = int(win.getFocusId())
|
||||
if currentModeName and 'plugin.video.kod' in xbmc.getInfoLabel('Container.FolderPath') and currentMode < 1000 and currentMode > 50: # inside addon and in itemlist view
|
||||
content, Type, mode = platformtools.getCurrentView()
|
||||
content, Type = platformtools.getCurrentView()
|
||||
defaultMode = int(config.get_setting('view_mode_%s' % content).split(',')[-1])
|
||||
if currentMode != defaultMode:
|
||||
if content in ['addon', 'server', 'channel'] and currentMode != 55 and Type == '':
|
||||
config.set_setting('view_mode_time', str(time.time()))
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
if content in ['addon', 'server', 'channel'] and currentMode == 55 and time.time() - float(config.get_setting('view_mode_time')) > 3:
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
logger.info('viewmode changed: ' + currentModeName + '-' + str(currentMode) + ' - content: ' + content)
|
||||
config.set_setting('view_mode_%s' % content, currentModeName + ', ' + str(currentMode))
|
||||
except:
|
||||
@@ -401,6 +395,8 @@ if __name__ == "__main__":
|
||||
# Copia Custom code a las carpetas de Alfa desde la zona de Userdata
|
||||
from platformcode import custom_code
|
||||
custom_code.init()
|
||||
from threading import Thread
|
||||
Thread(target=viewmodeMonitor).start()
|
||||
|
||||
if not config.get_setting("update", "videolibrary") == 2:
|
||||
check_for_update(overwrite=False)
|
||||
|
||||
Reference in New Issue
Block a user