in module addon.py:
add param "refresh_addon_id" for method refresh in Addon class
and change in body method :`
# Fetch channels
if refresh_addon_id and refresh_addon_id == addon.addon_id:
data = addon.get_channels()
addon.save_data('.channels.cache', data)
else:
data = addon.read_data('.channels.cache')
channels.append(dict(
addon_id=addon.addon_id,
addon_name=kodiutils.addon_name(addon.addon_obj),
channels=data,
))
[...]
# Fetch EPG
if refresh_id and refresh_id == addon.addon_id:
data = addon.get_epg()
addon.save_data('.epg.cache', data)
else:
data = addon.read_data('.epg.cache')
epg.append(data)
`
in module funcions.py
add params: "addon_id", "show_progress", "open_settings" for funcion refresh:
and change body funcion to:`
def refresh(addon_id=None, show_progress=False, open_settings=False):
Addon.refresh(addon_id, show_progress)
if open_settings:
kodiutils.open_settings()
`
add to body funcion run:
`
params = {}
if len(args) > 2:
params['addon_id'] = args[2]
if len(args) > 3:
if 'show_progress' in args: params['show_progress'] = True
if 'open_settings' in args: params['open_settings'] = True
function_map.get(function)(**params)
`
and change setting in settings.xml
from:
`
<setting label="30803" type="action" action="RunScript(service.iptv.manager,refresh)"/> <!-- Force refresh now -->
to
<setting label="30803" type="action" action="RunScript(service.iptv.manager,refresh,,show_progress,open_settings)"/> <!-- Force refresh now -->
in module addon.py: add param "refresh_addon_id" for method refresh in Addon class and change in body method :`
[...]
`
in module funcions.py add params: "addon_id", "show_progress", "open_settings" for funcion refresh: and change body funcion to:`
` add to body funcion run:
`
`
and change setting in settings.xml from: `
to
`