Exemplo n.º 1
0
def HELPWIZARD(name,url,description,filetype):
    path=xbmc.translatePath(os.path.join('special://home','addons','packages')); confirm=xbmcgui.Dialog(); filetype=filetype.lower(); 
    if filetype=='splash':
        try: html=main.OPEN_URL(url)
        except: return
        import splash_highway as splash
        SplashBH=xbmc.translatePath(os.path.join(main.AddonPath,'ContentPanel.png'))
        ExitBH=xbmc.translatePath(os.path.join(main.AddonPath,'Exit.png'))
        splash.do_My_TextSplash2(html,SplashBH,12,TxtColor='0xff00bfff',Font='font12',BorderWidth=40,ImgexitBtn=ExitBH,colorDiffuse='0xff00bfff'); 
        return
    if confirm.yesno(TeamName,"Would you like %s to "%SiteDomain,"customize your add-on selection? "," "):
        dp=xbmcgui.DialogProgress(); dp.create(AddonTitle,"Downloading ",'','Please Wait')
        lib=os.path.join(path,name+'.zip')
        try: os.remove(lib)
        except: pass
        ### ## ... ## 
        #try:
        #    if (main.isFile(LocalLinks)==False) or (main.isFile(RequiredHostsPath)==False): FHTML=main.OPEN_URL(RequiredHostsUrl); main.FileSave(RequiredHostsPath,FHTML); time.sleep(2)
        #except: pass
        if main.isFile(RequiredHostsPath)==False: dialog=xbmcgui.Dialog(); dialog.ok("Error!",'import not found.'); return
        try: import requiredhosts as RequiredHosts
        except: print "error attempting to import requiredhosts as RequiredHosts"; dialog=xbmcgui.Dialog(); dialog.ok("Error!","import failed."); return
        #print {'url':url}
        url=RequiredHosts.CheckForHosts(url); #print {'url':url}
        ### ## ... ## 
        if str(url).endswith('[error]'): print url; dialog=xbmcgui.Dialog(); dialog.ok("Error!",url); return
        if '[error]' in url: print url; dialog=xbmcgui.Dialog(); dialog.ok("Error!",url); return
        if not str(url).lower().startswith('http://'): print url; dialog=xbmcgui.Dialog(); dialog.ok("Error!",url); return
        print {'url':url}
        downloader.download(url,lib,dp)
        ### ## ... ## 
        #return ## For Testing 2 Black Overwrite of stuff. ##
        ### ## ... ## 
        if   filetype=='main':  addonfolder=xbmc.translatePath('special://home')
        elif filetype=='addon': addonfolder=xbmc.translatePath(os.path.join('special://home','addons'))
        else: print {'filetype':filetype}; dialog=xbmcgui.Dialog(); dialog.ok("Error!",'filetype: "%s"'%str(filetype)); return
        #time.sleep(2)
        xbmc.sleep(4000)
        dp.update(0,"","Extracting Zip Please Wait")
        print '======================================='; print addonfolder; print '======================================='
        extract.all(lib,addonfolder,dp)
        proname=xbmc.getInfoLabel("System.ProfileName")
        if (filetype=='main') and (settings.getSetting('homescreen-shortcuts')=='true'):
            link=main.OPEN_URL(wizardUrl+'shortcuts.txt')
            shorts=re.compile('shortcut="(.+?)"').findall(link)
            for shortname in shorts: main.xEB('Skin.SetString(%s)'%shortname)
        if (filetype=='main') and (settings.getSetting('other-skin-settings')=='true'):
            #main.xEB('Skin.SetString(CustomBackgroundPath,%s)' %img)
            #main.xEB('Skin.SetBool(ShowBackgroundVideo)')       ## Set to true so we can later set them to false.
            #main.xEB('Skin.SetBool(ShowBackgroundVis)')         ## Set to true so we can later set them to false.
            #main.xEB('Skin.ToggleSetting(ShowBackgroundVideo)') ## Switching from true to false.
            #main.xEB('Skin.ToggleSetting(ShowBackgroundVis)')   ## Switching from true to false.
            xEBb('HideBackGroundFanart')
            xEBb('HideVisualizationFanart')
            xEBb('AutoScroll')
        if (filetype=='main') and (main.isFile(xbmc.translatePath(SkinBackGroundImg))==True): 
            xEBS('CustomBackgroundPath',SkinBackGroundImg)
            xEBb('UseCustomBackground')
        #time.sleep(2)
        xbmc.sleep(4000)
        xbmc.executebuiltin('UnloadSkin()'); xbmc.executebuiltin('ReloadSkin()'); xbmc.executebuiltin("LoadProfile(%s)" % proname)
        dialog=xbmcgui.Dialog(); dialog.ok("Success!","Installation Complete","   [COLOR gold]Brought To You By %s[/COLOR]"%SiteDomain)
Exemplo n.º 2
0
def xEBb(t): main.xEB('Skin.SetBool(%s)'%t)
def xEBS(t,n): main.xEB('Skin.SetString(%s,%s)'%(t,n))
Exemplo n.º 3
0
def xEBS(t,n): main.xEB('Skin.SetString(%s,%s)'%(t,n))
def HELPWIZARD(name,url,description,filetype):
Exemplo n.º 4
0
def HELPWIZARD(name,url,description,filetype):
    path=xbmc.translatePath(os.path.join('special://home','addons','packages')); confirm=xbmcgui.Dialog(); filetype=filetype.lower(); 
    if filetype=='splash':
        try: html=main.OPEN_URL(url)
        except: return
        import splash_highway as splash
        SplashBH=xbmc.translatePath(os.path.join(main.AddonPath,'ContentPanel.png'))
        ExitBH=xbmc.translatePath(os.path.join(main.AddonPath,'Exit.png'))
        splash.do_My_TextSplash2(html,SplashBH,12,TxtColor='0xff00bfff',Font='font12',BorderWidth=40,ImgexitBtn=ExitBH,colorDiffuse='0xff00bfff'); 
        return
    if confirm.yesno(TeamName,"Would you like %s to "%SiteDomain,"customize your add-on selection? "," "):
        dp=xbmcgui.DialogProgress(); dp.create(AddonTitle,"Downloading ",'','Please Wait')
        lib=os.path.join(path,name+'.zip')
        try: os.remove(lib)
        except: pass
        ### ## ... ## 
        #try:
        #    if (main.isFile(LocalLinks)==False) or (main.isFile(RequiredHostsPath)==False): FHTML=main.OPEN_URL(RequiredHostsUrl); main.FileSave(RequiredHostsPath,FHTML); time.sleep(2)
        #except: pass
        if main.isFile(RequiredHostsPath)==False: dialog=xbmcgui.Dialog(); dialog.ok("Error!",'import not found.'); return
        try: import requiredhosts as RequiredHosts
        except: print "error attempting to import requiredhosts as RequiredHosts"; dialog=xbmcgui.Dialog(); dialog.ok("Error!","import failed."); return
        #print {'url':url}
        url=RequiredHosts.CheckForHosts(url); #print {'url':url}
        ### ## ... ## 
        if str(url).endswith('[error]'): print url; dialog=xbmcgui.Dialog(); dialog.ok("Error!",url); return
        if '[error]' in url: print url; dialog=xbmcgui.Dialog(); dialog.ok("Error!",url); return
        if not str(url).lower().startswith('http://'): print url; dialog=xbmcgui.Dialog(); dialog.ok("Error!",url); return
        print {'url':url}
        downloader.download(url,lib,dp)
        ### ## ... ## 
        #return ## For Testing 2 Black Overwrite of stuff. ##
        ### ## ... ## 
        if   filetype=='main':  addonfolder=xbmc.translatePath('special://home')
        elif filetype=='addon': addonfolder=xbmc.translatePath(os.path.join('special://home','addons'))
        else: print {'filetype':filetype}; dialog=xbmcgui.Dialog(); dialog.ok("Error!",'filetype: "%s"'%str(filetype)); return
        #time.sleep(2)
        xbmc.sleep(4000)
        dp.update(0,"","Extracting Zip Please Wait")
        print '======================================='; print addonfolder; print '======================================='
        extract.all(lib,addonfolder,dp)
        proname=xbmc.getInfoLabel("System.ProfileName")
        if (filetype=='main') and (settings.getSetting('homescreen-shortcuts')=='true'):
            link=main.OPEN_URL(wizardUrl+'shortcuts.txt')
            shorts=re.compile('shortcut="(.+?)"').findall(link)
            for shortname in shorts: main.xEB('Skin.SetString(%s)'%shortname)
        if (filetype=='main') and (settings.getSetting('other-skin-settings')=='true'):
            #main.xEB('Skin.SetString(CustomBackgroundPath,%s)' %img)
            #main.xEB('Skin.SetBool(ShowBackgroundVideo)')       ## Set to true so we can later set them to false.
            #main.xEB('Skin.SetBool(ShowBackgroundVis)')         ## Set to true so we can later set them to false.
            #main.xEB('Skin.ToggleSetting(ShowBackgroundVideo)') ## Switching from true to false.
            #main.xEB('Skin.ToggleSetting(ShowBackgroundVis)')   ## Switching from true to false.
            xEBb('HideBackGroundFanart')
            xEBb('HideVisualizationFanart')
            xEBb('AutoScroll')
        if (filetype=='main') and (main.isFile(xbmc.translatePath(SkinBackGroundImg))==True): 
            xEBS('CustomBackgroundPath',SkinBackGroundImg)
            xEBb('UseCustomBackground')
        #time.sleep(2)
        xbmc.sleep(4000)
        xbmc.executebuiltin('UnloadSkin()'); xbmc.executebuiltin('ReloadSkin()'); xbmc.executebuiltin("LoadProfile(%s)" % proname)
        dialog=xbmcgui.Dialog(); dialog.ok("Success!","Installation Complete","   [COLOR gold]Brought To You By %s[/COLOR]"%SiteDomain)
Exemplo n.º 5
0
def xEBS(t,n): main.xEB('Skin.SetString(%s,%s)'%(t,n))
def HELPWIZARD(name,url,description,filetype):
Exemplo n.º 6
0
def xEBb(t): main.xEB('Skin.SetBool(%s)'%t)
def xEBS(t,n): main.xEB('Skin.SetString(%s,%s)'%(t,n))
Exemplo n.º 7
0
def xEBS(t, n):
    main.xEB('Skin.SetString(%s,%s)' % (t, n))
Exemplo n.º 8
0
def xEBb(t):
    main.xEB('Skin.SetBool(%s)' % t)