def system(self, data, cl=False):
util.debug("[SC] SYSYEM CL: %s" % str(cl));
if cl is False and "setContent" in data:
xbmcplugin.setContent(int(sys.argv[1]), data["setContent"])
'''
view_mode=data["setContent"].lower()
skin_name=xbmc.getSkinDir() # nacitame meno skinu
util.debug("[SC] skin_name='"+skin_name+"'")
try:
util.debug("[SC] view mode is "+view_mode)
view_codes=sctop.ALL_VIEW_CODES.get(view_mode)
view_code=view_codes.get(skin_name)
util.debug("[SC] view code for "+view_mode+" in "+skin_name+" is "+str(view_code))
xbmc.executebuiltin("Container.SetViewMode("+str(view_code)+")")
#xbmc.executebuiltin("Container.Refresh")
except:
util.debug("[SC] Unable to find view code for view mode "+str(view_mode)+" and skin "+skin_name)
'''
if cl is False and "setPluginCategory" in data:
xbmcplugin.setPluginCategory(int(sys.argv[1]), data["setPluginCategory"])
if cl is False and "addSortMethod" in data:
xbmcplugin.addSortMethod(int(sys.argv[1]), sctop.sortmethod[int(data["addSortMethod"])])
if cl is False and data.get('addSortMethods'):
for m in data.get("addSortMethods"):
xbmcplugin.addSortMethod(int(sys.argv[1]), sctop.sortmethod[int(m)])
if cl is False and "setPluginFanart" in data:
xbmcplugin.setPluginFanart(int(sys.argv[1]), data["setPluginFanart"])
if cl is False and "version" in data:
util.info("[SC] kontrola verzie: %s %s" % (str(sctop.addonInfo('version')), data["version"]))
if sctop.addonInfo('version') != data["version"] and sctop.getSetting('ver') != data['version']:
try:
sctop.dialog.ok(sctop.getString(30954), sctop.getString(30955) % str(data['version']))
except:
pass
xbmc.executebuiltin('UpdateAddonRepos')
sctop.setSetting('ver', data['version'])
if sctop.getSettingAsBool('cachemigrate') == '' or sctop.getSettingAsBool('cachemigrate') is False:
self.parent.cacheMigrate()
pass
pass
if cl is False and "focus" in data:
self.parent.system = {"focus": data['focus']}
if cl is True and "focus" in data:
try:
self.parent.endOfDirectory()
util.debug("[SC] nastavujem focus na: %d" % int(data['focus']))
xel = xbmcgui.Window(xbmcgui.getCurrentWindowId())
ctr = xel.getControl(xel.getFocusId())
ctr.selectItem(int(data['focus']))
except Exception, e:
util.debug("[SC] error focus :-( %s" % str(traceback.format_exc()))
pass
评论列表
文章目录