def Maintain(): if not os.path.exists(packagesdir): os.makedirs(packagesdir) try: if os.path.exists(cachePath): cacheSize = maintenance.get_size(cachePath) else: cacheSize = maintenance.get_size(tempPath) packageSize = maintenance.get_size(packagesdir) thumbSize = maintenance.get_size(thumbnails) except: pass try: convertCache = maintenance.convertSize(cacheSize) convertPackages = maintenance.convertSize(packageSize) convertThumbs = maintenance.convertSize(thumbSize) except: pass cache = '[COLOR ff9f9f9f]Clear Cache = [/COLOR]' + str(convertCache) packages = '[COLOR ff9f9f9f]Clear Packages = [/COLOR]' + str(convertPackages) thumbs = '[COLOR ff9f9f9f]Delete Thumbnails = [/COLOR]' + str(convertThumbs) option = dialog.select(addonTitle+' Maintenace', [cache, space, packages, space, thumbs]) if option < 0: menu() if option == 0: maintenance.clearCache() if option == 2: maintenance.clearPackages() if option == 4: maintenance.removeThumbs() if option == [1,3]: Maintain()
except: pass try: fanart=urllib.unquote_plus(params["fanart"]) except: pass try: description=urllib.unquote_plus(params["description"]) except: pass if mode==None or url==None or len(url)<1: INDEX() elif mode==1: maintenance.clearCache() elif mode==2: maintenance.deleteThumbnails() elif mode==3: maintenance.purgePackages() elif mode==4: ACCOUNT() elif mode==5: maintMenu() elif mode==6: wipe.FRESHSTART()
except: pass try: fanart = urllib.unquote_plus(params["fanart"]) except: pass try: description = urllib.unquote_plus(params["description"]) except: pass if mode == None or url == None or len(url) < 1: INDEX() elif mode == 1: maintenance.clearCache() elif mode == 2: maintenance.deleteThumbnails() elif mode == 3: maintenance.purgePackages() elif mode == 4: ACCOUNT() elif mode == 5: maintMenu() elif mode == 6: wipe.FRESHSTART()