add use_cache query param

This commit is contained in:
faush01
2018-11-15 10:01:21 +11:00
parent e28365da15
commit 11e8a2ceec
3 changed files with 6 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.embycon"
name="EmbyCon"
version="1.6.9"
version="1.6.10"
provider-name="Team B">
<requires>
<import addon="xbmc.python" version="2.25.0"/>

View File

@@ -62,7 +62,7 @@ class DataManager():
os.remove(cache_file)
if os.path.isfile(cache_file) and use_cache:
log.debug("Loading url data from pickle data")
log.debug("Loading url data from cached pickle data")
with open(cache_file, 'rb') as handle:
item_list = cPickle.load(handle)

View File

@@ -308,6 +308,7 @@ def setSort(pluginhandle, viewType):
xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_RATING)
xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
def getContent(url, params):
log.debug("== ENTER: getContent ==")
@@ -395,7 +396,9 @@ def getContent(url, params):
#if result is not None and isinstance(result, dict):
# total_records = result.get("TotalRecordCount", 0)
dir_items, detected_type = processDirectory(url, progress, params, use_cache_data=True)
use_cache = params.get("use_cache", "true") == "true"
dir_items, detected_type = processDirectory(url, progress, params, use_cache)
if dir_items is None:
return