forked from zach-morris/plugin.program.iagl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclear_IAGL_cache.py
More file actions
18 lines (18 loc) · 920 Bytes
/
clear_IAGL_cache.py
File metadata and controls
18 lines (18 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import xbmc, xbmcgui, xbmcvfs
from resources.lib.utils import loc_str, get_mem_cache, set_mem_cache, clear_mem_cache
from resources.lib.main import iagl_addon
iagl_addon = iagl_addon()
if not get_mem_cache('iagl_script_started'):
set_mem_cache('iagl_script_started','true')
xbmc.log(msg='IAGL: Clear cache script started', level=xbmc.LOGDEBUG)
if iagl_addon.clear_list_cache_folder() and iagl_addon.clear_game_cache_folder():
current_dialog = xbmcgui.Dialog()
ok_ret = current_dialog.ok(loc_str(30202),loc_str(30306)%{'game_list_id':'All Lists and Games'})
del current_dialog
iagl_addon.clear_all_mem_cache()
xbmc.executebuiltin('Container.Refresh')
clear_mem_cache('iagl_script_started')
xbmc.log(msg='IAGL: Clear cache script completed', level=xbmc.LOGDEBUG)
else:
xbmc.log(msg='IAGL: Script already running', level=xbmc.LOGDEBUG)
del iagl_addon, loc_str, get_mem_cache, set_mem_cache, clear_mem_cache