def runScript(): script = None args = "".join(argv[1:2]) if "moviesetinfo" in args: strListItem = "Container(%s).ListItem" % ADDON.getSetting( "containerId") if IsTrue(xbmc.getInfoLabel("%s.Property(HasMovieSets)" % strListItem)): idset = xbmc.getInfoLabel("%s.Label2" % strListItem) xbmc.executebuiltin("ActivateWindow(busydialog)") from lib import dialogs if dialogs.showInfo(idset): xbmc.executebuiltin("SetProperty(MovieSets.Update,true)") else: xbmc.executebuiltin("Action(Info)") elif not args or "manager" in args: xbmc.executebuiltin("ActivateWindow(busydialog)") script = "moviesets_mgr" elif "containerId" in args and not IsTrue( xbmc.getInfoLabel( "Window(VideoLibrary).Property(MovieSets.IsAlive)")): script = "moviesets" if script: xbmc.executebuiltin("RunScript(%s.py,%s)" % ( os.path.join(os.getcwd(), "lib", script), args, ))
def runScript(): script = None args = "".join( argv[ 1:2 ] ) if "moviesetinfo" in args: strListItem = "Container(%s).ListItem" % ADDON.getSetting( "containerId" ) if IsTrue( xbmc.getInfoLabel( "%s.Property(HasMovieSets)" % strListItem ) ): idset = xbmc.getInfoLabel( "%s.Label2" % strListItem ) xbmc.executebuiltin( "ActivateWindow(busydialog)" ) from lib import dialogs if dialogs.showInfo( idset ): xbmc.executebuiltin( "SetProperty(MovieSets.Update,true)" ) else: xbmc.executebuiltin( "Action(Info)" ) elif not args or "manager" in args: xbmc.executebuiltin( "ActivateWindow(busydialog)" ) script = "moviesets_mgr" elif "containerId" in args and not IsTrue( xbmc.getInfoLabel( "Window(VideoLibrary).Property(MovieSets.IsAlive)" ) ): script = "moviesets" if script: xbmc.executebuiltin( "RunScript(%s.py,%s)" % ( os.path.join( os.getcwd(), "lib", script ), args, ) )
# -*- coding: utf-8 -*- import os, sys, xbmc if __name__ == '__main__': if sys.argv[-1].startswith('settings') or sys.argv[-1] == 'smilies': from lib import dialogs, util CACHE_PATH = xbmc.translatePath(os.path.join(util.__addon__.getAddonInfo('profile'),'cache')) dialogs.CACHE_PATH = CACHE_PATH if sys.argv[-1].startswith('settingshelp_'): dialogs.showHelp('settings-' + sys.argv[-1].split('_')[-1]) if sys.argv[-1].startswith('settingsinfo_'): dialogs.showInfo(sys.argv[-1].split('_')[-1]) elif sys.argv[-1] == 'smilies': dialogs.smiliesDialog() elif sys.argv[-1] == 'change_keyboard': from lib import mods,util mods.installKeyboardMod(change=True) util.setRefreshXBMCSkin() elif sys.argv[-1] == 'install_font': from lib import mods, util mods.toggleFontInstallation() util.setRefreshXBMCSkin() else: import main main.init()