コード例 #1
0
ファイル: startup.py プロジェクト: KWIZARDK/miwizard
    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)
    if workingxml == True:
        ver = wiz.parseDOM(wiz.openURL(REPOADDONXML),
                           'addon',
                           ret='version',
                           attrs={'id': REPOID})
        if len(ver) > 0:
            installzip = '%s-%s.zip' % (REPOID, ver[0])
            workingrepo = wiz.workingURL(REPOZIPURL + installzip)
            if workingrepo == True:
                DP.create(ADDONTITLE, 'Downloading Repo...', '', 'Please Wait')
                if not os.path.exists(PACKAGES): os.makedirs(PACKAGES)
コード例 #2
0
ファイル: startup.py プロジェクト: Shepo6/Shepo
	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)
	if workingxml == True:
		ver = wiz.parseDOM(wiz.openURL(REPOADDONXML), 'addon', ret='version', attrs = {'id': REPOID})
		if len(ver) > 0:
			installzip = '%s-%s.zip' % (REPOID, ver[0])
			workingrepo = wiz.workingURL(REPOZIPURL+installzip)
			if workingrepo == True:
				DP.create(ADDONTITLE,'Downloading Repo...','', 'Please Wait')
				if not os.path.exists(PACKAGES): os.makedirs(PACKAGES)
				lib=os.path.join(PACKAGES, installzip)
				try: os.remove(lib)
				except: pass