Example #1
0
def Clear_Cache():
    choice = xbmcgui.Dialog().yesno(
        'Clear your Cache?',
        'If you still cant see your account after ok button is clicked your details are incorrect',
        nolabel='Cancel',
        yeslabel='OK')
    if choice == 1:
        GoDev.Wipe_Cache()
Example #2
0
def Remove_Thumbs():
    choice = xbmcgui.Dialog().yesno('Clear Cached Images?',
                                    'This will clear your thumbnail files.',
                                    'These will automatically be',
                                    'repopulated after a restart.',
                                    nolabel='Cancel',
                                    yeslabel='Delete')
    if choice == 1:
        GoDev.Destroy_Path(THUMBNAILS)
Example #3
0
def Clear_Cache():
    choice = xbmcgui.Dialog().yesno('Are you Sure?',
                                    'This will delete all your Cache',
                                    'It can help with Buffering issue',
                                    'and can clear alot of space',
                                    nolabel='Cancel',
                                    yeslabel='Delete')
    if choice == 1:
        GoDev.Wipe_Cache()
Example #4
0
def Remove_Textures():
    choice = xbmcgui.Dialog().yesno('Clear Cached Images?',
                                    'This will clear your textures13.db file.',
                                    'These will automatically be',
                                    'repopulated after a restart.',
                                    nolabel='Cancel',
                                    yeslabel='Delete')
    if choice == 1:
        GoDev.Remove_Textures()
Example #5
0
def Clear_Cache():
    choice = xbmcgui.Dialog().yesno(
        'Clear your Cache?',
        'This will Refresh your Live Events',
        'It can help with Buffering issues also',
        'If you have any issues, Make sure you are in our facebook group - Were here to help.',
        nolabel='Cancel',
        yeslabel='Delete')
    if choice == 1:
        GoDev.Wipe_Cache()
Example #6
0
def Remove_Packages():
    choice = xbmcgui.Dialog().yesno(
        'Delete Packages Folder?',
        'This will free up space by deleting the zip install',
        'files of your addons. The only downside is you\'ll no',
        'longer be able to rollback to older versions.',
        nolabel='Cancel',
        yeslabel='Delete')
    if choice == 1:
        GoDev.Delete_Packages()
        Dialog.ok("Packages Removed", '',
                  'Your zip install files have now been removed.', '')
Example #7
0
def Remove_Crash_Logs():
    choice = xbmcgui.Dialog().yesno(
        'Remove All Crash Logs?',
        'There is absolutely no harm in doing this, these are',
        'log files generated when Kodi crashes and are',
        'only used for debugging purposes.',
        nolabel='Cancel',
        yeslabel='Delete')
    if choice == 1:
        GoDev.Delete_Logs()
        Dialog.ok("Crash Logs Removed", '',
                  'Your crash log files have now been removed.', '')
Example #8
0
def Remove_Addon_Data():
    choice = xbmcgui.Dialog().yesno(
        'Delete Addon_Data Folder?',
        'This will free up space by deleting your addon_data',
        'folder. This contains all addon related settings',
        'including username and password info.',
        nolabel='Cancel',
        yeslabel='Delete')
    if choice == 1:
        GoDev.Delete_Userdata()
        Dialog.ok("Addon_Data Removed", '',
                  'Your addon_data folder has now been removed.', '')
Example #9
0
def license_check2(params):
	loginurl   = base64.b64decode("JXMvZ2V0LnBocD91c2VybmFtZT0lcyZwYXNzd29yZD0lcyZ0eXBlPW0zdV9wbHVzJm91dHB1dD10cw==")%(lehekylg,kasutajanimi,salasona)
	try:
		connection = urllib2.urlopen(loginurl)
		print connection.getcode()
		connection.close()
		#playlist found, user active & login correct, proceed to addon
		xbmc.executebuiltin('Container.Refresh')
		
	except urllib2.HTTPError, e:
		print e.getcode()
		#playlist not found, either expired or wrong login

		#check for expired account
		content    = GoDev.OPEN_URL(andmelink)
		match    = re.compile('"auth":(.+?)').findall(content) 

		for result in match:
			if "0" in result:
				dialog.ok('[COLOR white]Invalid Login[/COLOR]','[COLOR white]Incorrect login details found![/COLOR]','[COLOR white]Please check your spelling and case sensitivity[/COLOR]','[COLOR white]Check your password with the team otherwise[/COLOR]')
				plugintools.open_settings_dialog()
			else:
				dialog.ok("[COLOR white]Expired Login[/COLOR]",'[COLOR white]Your login has expired[/COLOR]','[COLOR white]Please review your account information[/COLOR]','[COLOR white]or contact the team[/COLOR]')
				xbmc.executebuiltin('Container.Refresh')
Example #10
0
def Wipe_Kodi():
    mybackuppath = xbmc.translatePath(
        os.path.join(USB, 'Community Builds', 'My Builds'))
    choice = xbmcgui.Dialog().yesno("Are you sure!!!",
                                    'This will revert back to a blank Kodi?',
                                    '',
                                    'Dont blame me if it goes wrong!',
                                    yeslabel='Yes',
                                    nolabel='No')
    if choice == 1:
        if skin != "skin.confluence":
            Dialog.ok('Kodi UK',
                      'Please Change to the default Confluence skin',
                      'before performing a wipe.', '')
            xbmc.executebuiltin("ActivateWindow(appearancesettings)")
            return
        else:
            choice = xbmcgui.Dialog().yesno(
                "Kodi UK",
                'This will completely wipe your install.',
                'Are you sure?',
                '',
                yeslabel='Yes',
                nolabel='No')
            if choice == 0:
                if not os.path.exists(mybackuppath):
                    os.makedirs(mybackuppath)
                vq = 'backup.zip'
                if (not vq): return False, 0
                title = urllib.quote_plus(vq)
                backup_zip = xbmc.translatePath(
                    os.path.join(mybackuppath, title + '.zip'))
                exclude_dirs_full = ['plugin.program.kodiuktv']
                exclude_files_full = [
                    "xbmc.log", "xbmc.old.log", "kodi.log", "kodi.old.log",
                    '.DS_Store', '.setup_complete', 'XBMCHelper.conf'
                ]
                message_header = "Creating full backup of existing build"
                message1 = "Archiving..."
                message2 = ""
                message3 = "Please Wait"
                GoDev.Archive_Tree(HOME, backup_zip, message_header, message1,
                                   message2, message3, exclude_dirs_full,
                                   exclude_files_full)
            choice = xbmcgui.Dialog().yesno(
                "Remove KodiUK Wizard?",
                'Do you also want to remove the Kodi UK Wizard',
                'add-on and have a complete fresh start or would you',
                'prefer to keep this on your system?',
                yeslabel='Remove',
                nolabel='Keep')
            if choice == 0:
                GoDev.Remove_Textures()
                trpath = xbmc.translatePath(os.path.join(ADDONS, AddonID, ''))
                trtemp = xbmc.translatePath(
                    os.path.join(HOME, '..', 'kodiukwizard.zip'))
                GoDev.Archive_File(trpath, trtemp)
                deppath = xbmc.translatePath(
                    os.path.join(ADDONS, 'script.module.addon.common', ''))
                deptemp = xbmc.translatePath(
                    os.path.join(HOME, '..', 'kodiukwizarddep.zip'))
                GoDev.Archive_File(deppath, deptemp)
                GoDev.Destroy_Path(HOME)
                if not os.path.exists(trpath):
                    os.makedirs(trpath)
                if not os.path.exists(deppath):
                    os.makedirs(deppath)
                time.sleep(1)
                GoDev.Read_Zip(trtemp)
                DialogProcess.create("Kodi UK", "Checking ", '', 'Please Wait')
                DialogProcess.update(0, "", "Extracting Zip Please Wait")
                extract.all(trtemp, trpath, dialogprocess)
                GoDev.Read_Zip(deptemp)
                extract.all(deptemp, deppath, dialogprocess)
                DialogProcess.update(0, "", "Extracting Zip Please Wait")
                DialogProcess.close()
                time.sleep(1)
            elif choice == 1:
                GoDev.Remove_Textures()
                GoDev.Destroy_Path(HOME)
                DialogProcess.close()
            else:
                return
Example #11
0
    Restore_Option()  #RestoreMenu
elif mode == 'GeneralMaint':
    GeneralMaint()  #GeneralMaint
elif mode == 'Clear_Cache':
    Clear_Cache()  #Clear_Cache
elif mode == 'Remove_Addon_Data':
    Remove_Addon_Data()  #Remove_Addon_Data
elif mode == 'Remove_Crash_Logs':
    Remove_Crash_Logs()  #Remove_Crash_Logs
elif mode == 'Remove_Textures':
    Remove_Textures()  #Remove_Textures
elif mode == 'Remove_Thumbs':
    Remove_Thumbs()  #Remove_Thumbs
elif mode == 'Remove_Packages':
    Remove_Packages()  #Remove_Packages
elif mode == 'Wipe_Kodi':
    Wipe_Kodi()  #Wipe_Kodi
elif mode == 'make_special':
    GoDev.Fix_Special(url)  #make Special
elif mode == 'backupzip':
    GoDev.Backupzip()  #Backitup
elif mode == 'RestoreIt':
    GoDev.RestoreIt()  #RestoreBuild
elif mode == 'ComingSoon':
    ComingSoon()  #ComingSoon
elif mode == 1:
    wizard(name, url, description)  #OpenWizard
elif mode == 2:
    wizard2(name, url, description)  #OpenWizard
xbmcplugin.endOfDirectory(int(sys.argv[1]))