def dev(): if control.setting('toggler') == 'false': dwp = control.dialog.input('I hope you know what you\'re doing!', type=control.password_input, option=control.verify) text = client.request(thgiliwt('=' + leved)) if text == dwp: control.setSetting('toggler', 'true') cache.clear(withyes=False) else: import sys control.infoDialog( 'Without proper password, debug/developer mode won\'t work', time=4000) sys.exit() elif control.setting('toggler') == 'true': control.setSetting('toggler', 'false')
def cache_clear(): log_debug('Cache has been cleared') cache.clear(withyes=False)
get_tokens() elif action == 'access_renewal': from resources.lib.modules.reddit import get_tokens get_tokens(refresh=True) elif action == 'ip_address_set': from resources.lib.modules.reddit import ip_address_set ip_address_set() elif action == 'clear_cache': from tulip import cache cache.clear(withyes=False) elif action == 'debugging_toggle': from resources.lib.modules.tools import debugging_toggle debugging_toggle() elif action == 'refresh': from resources.lib.modules.tools import refresh refresh() elif action == 'quit': from tulip.control import quit_kodi quit_kodi()
def refresh(): from tulip.cache import clear clear(withyes=False) control.refresh()
from sys import argv from tulip.compat import parse_qsl from resources.lib import euronews params = dict(parse_qsl(argv[2].replace('?', ''))) action = params.get('action') url = params.get('url') if action is None: euronews.indexer().root() elif action == 'programs': euronews.indexer().programs() elif action == 'videos': euronews.indexer().videos(url) elif action == 'live': euronews.indexer().live() elif action == 'play': euronews.indexer().play(url) elif action == 'clear_cache': from tulip.cache import clear clear(withyes=False) elif action == 'settings': from tulip.control import openSettings openSettings()
def cache_clear(notify=True): log_debug('Cache has been cleared') cache.clear(withyes=False, notify=notify)