1.0.0+kodimov.9: get a new guide into Kodi right after start or update
Kodi keeps its own copy of the programme guide and fetches it again only when IPTV Simple reloads its files, on its refresh timer; restarting IPTV Simple is not enough. After the first refresh following a Kodi start or add-on update, if the guide changed and nothing is playing, restart IPTV Simple with a 1-minute timer, wait for the reload, then restart it with the hourly timer again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5df60a1fb8
commit
e16dd66f63
5 files changed
+50
-16
No files matched your search
+10
-3
@@ -787,7 +787,7 @@ def export_channels_now():
|
||||
if m.export_channels_to_m3u8(channels_filename, addon.getSettingBool('only_subscribed')):
|
||||
LOG('export_channels_now: channel list changed')
|
||||
|
||||
def export_epg_now(quiet=False):
|
||||
def export_epg_now(quiet=False, reload_guide=False):
|
||||
# quiet: background refresh from the service, no pop-ups while watching TV
|
||||
def notify(message):
|
||||
if not quiet: show_notification(message, xbmcgui.NOTIFICATION_INFO)
|
||||
@@ -804,7 +804,14 @@ def export_epg_now(quiet=False):
|
||||
|
||||
if True: #not addon.getSettingBool('use_external_epg'):
|
||||
notify(addon.getLocalizedString(30311))
|
||||
m.export_epg_to_xml(epg_filename, addon.getSettingInt('export_days'), report_progress, only_subscribed)
|
||||
changed = m.export_epg_to_xml(epg_filename, addon.getSettingInt('export_days'), report_progress, only_subscribed)
|
||||
if changed and reload_guide:
|
||||
from . import kodimov
|
||||
try:
|
||||
pvr_dir = translatePath(xbmcaddon.Addon('pvr.iptvsimple').getAddonInfo('profile'))
|
||||
except RuntimeError: # IPTV Simple not installed or disabled
|
||||
pvr_dir = None
|
||||
if pvr_dir: kodimov.reload_iptv_guide(pvr_dir, 'kodimovplus')
|
||||
|
||||
notify(addon.getLocalizedString(30313))
|
||||
|
||||
@@ -900,7 +907,7 @@ def router(paramstring):
|
||||
elif params['action'] == 'create_iptv_settings':
|
||||
create_iptv_settings()
|
||||
elif params['action'] == 'export_epg_now':
|
||||
export_epg_now(quiet=params.get('quiet') == '1')
|
||||
export_epg_now(quiet=params.get('quiet') == '1', reload_guide=params.get('reload_guide') == '1')
|
||||
elif params['action'] == 'to_wishlist':
|
||||
to_wishlist(params)
|
||||
elif 'iptv' in params['action']:
|
||||
|
||||
Reference in new issue
Block a user