Example #1
0
def clearThumb(type=None):
    latest = wiz.latestDB('Textures')
    if not type == None: choice = 1
    else:
        choice = DIALOG.yesno(
            ADDONTITLE,
            '[COLOR %s]Would you like to delete the %s and Thumbnails folder?'
            % (COLOR2, latest),
            "They will repopulate on the next startup[/COLOR]",
            nolabel='[B][COLOR red]Don\'t Delete[/COLOR][/B]',
            yeslabel='[B][COLOR green]Delete Thumbs[/COLOR][/B]')
    if choice == 1:
        try:
            wiz.removeFile(os.join(DATABASE, latest))
        except:
            wiz.log('Failed to delete, Purging DB.')
            wiz.purgeDb(latest)
        wiz.removeFolder(THUMBS)
        #if not type == 'total': wiz.killxbmc()
    else:
        wiz.log('Clear thumbnames cancelled')
    wiz.redoThumbs()
Example #2
0
        '[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)

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:
Example #3
0
	else:
		wiz.log("Continuing Start Up Script")

wiz.log("[Path Check] Started", xbmc.LOGNOTICE)
path = os.path.split(ADDONPATH)
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")