Example #1
0
    wiz.log("[Path Check] Good!", xbmc.LOGNOTICE)

if KODIADDONS in ADDONPATH:
    wiz.log("Copying path to addons dir", xbmc.LOGNOTICE)
    if not os.path.exists(ADDONS): os.makedirs(ADDONS)
    newpath = xbmc.translatePath(
        os.path.join('special://home/addons/', ADDONID))
    if os.path.exists(newpath):
        wiz.log("Folder already exists, cleaning House", xbmc.LOGNOTICE)
        wiz.cleanHouse(newpath)
        wiz.removeFolder(newpath)
    try:
        wiz.copytree(ADDONPATH, newpath)
    except Exception, e:
        pass
    wiz.forceUpdate(True)

BACKUPLOCATION = xbmc.translatePath(BACKUPLOCATION)
MYBUILDS = os.path.join(BACKUPLOCATION, 'My_Builds')
if not os.path.exists(BACKUPLOCATION): os.makedirs(BACKUPLOCATION)
if not os.path.exists(MYBUILDS): os.makedirs(MYBUILDS)

wiz.log("[Auto Install Repo] Started", xbmc.LOGNOTICE)
if AUTOINSTALL == 'Yes' and not os.path.exists(os.path.join(ADDONS, REPOID)):
    workingxml = wiz.workingURL(REPOADDONXML)
    if workingxml == True:
        link = wiz.openURL(REPOADDONXML).replace('\n',
                                                 '').replace('\r', '').replace(
                                                     '\t', '')
        match = re.compile('<addon.+?id="%s".+?ersion="(.+?)".+?>' %
                           REPOID).findall(link)
Example #2
0
if not ADDONID == path[1]: DIALOG.ok(ADDONTITLE, '[COLOR %s]Please make sure that the plugin folder is the same as the ADDON_ID.[/COLOR]' % COLOR2, '[COLOR %s]Plugin ID:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, ADDONID), '[COLOR %s]Plugin Folder:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, path)); wiz.log("[Path Check] ADDON_ID and plugin folder doesnt match. %s / %s " % (ADDONID, path))
else: wiz.log("[Path Check] Good!", xbmc.LOGNOTICE)

if KODIADDONS in ADDONPATH:
	wiz.log("Copying path to addons dir", xbmc.LOGNOTICE)
	if not os.path.exists(ADDONS): os.makedirs(ADDONS)
	newpath = xbmc.translatePath(os.path.join('special://home/addons/', ADDONID))
	if os.path.exists(newpath):
		wiz.log("Folder already exists, cleaning House", xbmc.LOGNOTICE)
		wiz.cleanHouse(newpath)
		wiz.removeFolder(newpath)
	try:
		wiz.copytree(ADDONPATH, newpath)
	except Exception, e:
		pass
	wiz.forceUpdate(True)

if not os.path.exists(ADVANCED): writeAdvanced()

try:
	mybuilds = xbmc.translatePath(MYBUILDS)
	if not os.path.exists(mybuilds): xbmcvfs.mkdirs(mybuilds)
except:
	pass

wiz.log("Flushing Aged Cached Text Files")
wiz.flushOldCache()

wiz.log("[Auto Install Repo] Started", xbmc.LOGNOTICE)
if AUTOINSTALL == 'Yes' and not os.path.exists(os.path.join(ADDONS, REPOID)):
	workingxml = wiz.workingURL(REPOADDONXML)
Example #3
0
	if wiz.workingURL(WIZARDFILE):
		ver = wiz.checkWizard('version')
		zip = wiz.checkWizard('zip')
		if ver > VERSION:
			yes = DIALOG.yesno(ADDONTITLE, 'There is a new version of the %s!' % ADDONTITLE, 'Would you like to download v%s?' % ver, nolabel='Remind Me Later', yeslabel="Download")
			if yes:
				DP.create(ADDONTITLE,'Downloading Update...','', 'Please Wait')
				lib=os.path.join(PACKAGES, '%s-%s.zip' % (ADDON_ID, ver))
				try: os.remove(lib)
				except: pass
				downloader.download(zip, lib, DP)
				xbmc.sleep(2000)
				DP.update(0,"", "Installing %s update" % ADDONTITLE)
				ext = extract.all(lib, ADDONS, DP)
				DP.close()
				wiz.forceUpdate()
				wiz.LogNotify(ADDONTITLE,'Add-on updated')
	else: wiz.log("URL FOR WIZARDFILE INVALID: %s" % WIZARDFILE)

if ENABLE == 'Yes':
	if not NOTIFY == 'true':
		url = wiz.workingURL(NOTIFICATION)
		if url == True:
			link  = wiz.openURL(NOTIFICATION).replace('\r','').replace('\t','')
			id, msg = link.split('|||')
			if int(id) == NOTEID:
				if NOTEDISMISS == 'false':
					notify.Notification(msg=msg, title=ADDONTITLE, BorderWidth=10)
				else: xbmc.log("Notifications id[%s] Dismissed" % int(id))
			elif int(id) > NOTEID:
				xbmc.log("Notifications id: %s" % str(int(id)))
Example #4
0
elif mode == 'restore': backuprestore.Restore()
elif mode == 'restoredata': backuprestore.Restore_Login()
elif mode == 'restorezip': backuprestore.Read_Zip(url)
elif mode == 'restorelog': backuprestore.Read_Login_Data_Zip(url)
elif mode == 'restoremenu': Restore_Menu()
elif mode == 'rootpatch': backuprestore.reset_backup_location()
elif mode == 'savedata': Backup_Menu()
elif mode == 'sdfix': sportsdevil.SDFix()
elif mode == 'skindebugtoggle': xbmc.executebuiltin('Skin.ToggleDebug()')
elif mode == 'theme': base_info.Wizard_Theme(name, url, description)
elif mode == 'thememenu': Theme_Menu()
elif mode == 'togglesetting':
    base_info.setS(name, 'false' if base_info.getS(name) == 'true' else 'true')
    base_info.ebi('Container.Refresh')
elif mode == 'forceupdate':
    wiz.forceUpdate()
elif mode == 'viewlog':
    base_info.viewLogFile('kodi.log')
elif mode == 'viewoldlog':
    base_info.viewLogFile('kodi.old.log')
elif mode == 'viewwizlog':
    base_info.viewLogFile('wizard.log')
elif mode == 'wizcreds':
    contact.credits(CREDITSFILE)
elif mode == 'wizardupdate':
    base_info.wizardUpdate()
elif mode == 'youtubefix':
    youtube.YoutubeFix()
#######################################################################

#######################################################################