def PatchAdvanced(name, url, description): if base_info.workingURL(url) == False: return False path = xbmc.translatePath(os.path.join('special://home/addons', 'packages')) if not os.path.exists(path): os.makedirs(path) patchname = name dp = xbmcgui.DialogProgress() dp.create(ADDONTITLE, "", "", "[B]Advanced Settings: [/B]" + patchname) patchname = "advsettings" lib = os.path.join(path, patchname + '.zip') try: os.remove(lib) except: pass dialog = xbmcgui.Dialog() downloader.download(url, lib, dp) addonfolder = xbmc.translatePath(os.path.join('special://', 'home')) time.sleep(2) dp.update(0, "Extracting Zip Please Wait", "", " ") extract.all(lib, addonfolder, dp) time.sleep(1) try: os.remove(lib) except: pass xbmc.executebuiltin("Container.Refresh") dialog.ok( ADDONTITLE, "[COLOR snow]Advanced Settings installed![/COLOR]", "[COLOR white]You should now see an imporvment in buffering[/COLOR]")
def contact(msg='', TxtColor='0xFFFFFFFF', Font='font12', BorderWidth=10): base_info.loga("[Contact Notification] Started") url = base_info.workingURL(CONT_NOT) if url == True: link = base_info.OPEN_URL(CONT_NOT).replace('\r','').replace('\t','') id, msg = link.split('|||') base_info.loga("[Contact Notification] id: %s" % str(int(id))) base_info.setS('contnoteid', str(int(id))) base_info.setS('contnotedismiss', 'false') Contact_Notification(msg=msg) base_info.loga("[Contact Notification] Complete") else: base_info.loga("[Contact Notification] URL(%s): %s" % (CONT_NOT, url))
####################################################################### #Import Modules Section import xbmcgui import os import re import glo_var import base_info ####################################################################### ####################################################################### #Global Variables #Do Not Edit These Variables or any others in this wizard! ART = glo_var.ART FANART = glo_var.FANART BACKGROUND = glo_var.BACKGROUND if not glo_var.BACKGROUND == '' or not base_info.workingURL(glo_var.BACKGROUND) else FANART CONTNOT = base_info.getS('contnot') CONT_NOT = glo_var.SUPPORT CONTNOTEDISMISS= base_info.getS('contnotedismiss') CONTNOTEID = base_info.getS('contnoteid') cr = glo_var.COLOR cr1 = glo_var.COLOR1 cr2 = glo_var.COLOR2 cr3 = glo_var.COLOR3 cr4 = glo_var.COLOR4 CREDNOT = base_info.getS('crednot') CREDNOTEDISMISS= base_info.getS('crednotedismiss') CREDNOTEID = base_info.getS('crednoteid') FONTHEADER = glo_var.FONTHEADER if not glo_var.FONTHEADER == '' else "Font16" FONTSETTINGS = glo_var.FONTSETTINGS if not glo_var.FONTSETTINGS == '' else "Font14" HEADERTYPE = glo_var.HEADERTYPE if glo_var.HEADERTYPE == 'Image' else 'Text' HEADERMESSAGE = glo_var.HEADERMESSAGE
INSTALLED = base_info.getS('installed') NOTIFICATION = glo_var.NOTIFICATION NOTIFY = base_info.getS('notify') NOTEDISMISS = base_info.getS('notedismiss') NOTEID = base_info.getS('noteid') NOTEID = 0 if NOTEID == "" else int(NOTEID) PLUGIN = os.path.join(ADDONS, ADDON_ID) SKIN = xbmc.getSkinDir() TODAY = date.today() TOMORROW = TODAY + timedelta(days=1) THREEDAYS = TODAY + timedelta(days=3) ONEWEEK = TODAY + timedelta(days=7) UPDATECHECK = glo_var.UPDATECHECK if str(glo_var.UPDATECHECK).isdigit() else 1 NEXTCHECK = TODAY + timedelta(days=UPDATECHECK) WIZARDFILE = glo_var.WIZARDFILE WORKING = True if base_info.workingURL(WIZARDFILE) == True else False VERSION = base_info.addonInfo(ADDON_ID, 'version') VER = glo_var.VERSION ####################################################################### ####################################################################### def checkSkin(): base_info.loga("[Build Check] Invalid Skin Check Start") DEFAULTSKIN = base_info.getS('defaultskin') DEFAULTNAME = base_info.getS('defaultskinname') DEFAULTIGNORE = base_info.getS('defaultskinignore') gotoskin = False if not DEFAULTSKIN == '': if os.path.exists(os.path.join(ADDONS, DEFAULTSKIN)):