1.0.0+kodimov.5: write the programme guide before creating the TV guide
"Create settings for IPTV Simple" created the IPTV Simple instance and then exported channels and EPG. IPTV Simple could load before epg.xml existed, Kodi then stored an empty guide for every channel and didn't ask again for hours (seen on a fresh box). Export first, and stop with an error if the guide file wasn't written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9f062206c
commit
3940d1b3e6
3 files changed
+10
-3
No files matched your search
@@ -762,11 +762,17 @@ def create_iptv_settings():
|
||||
if os.path.exists(filename):
|
||||
res = xbmcgui.Dialog().yesno(addon.getLocalizedString(30322), addon.getLocalizedString(30323))
|
||||
if res == False: return
|
||||
# Write the channel list and the programme guide first: if IPTV Simple
|
||||
# starts before epg.xml exists, Kodi stores an empty guide for every
|
||||
# channel and doesn't ask again for hours.
|
||||
export_epg_now()
|
||||
if not os.path.exists(os.path.join(profile_dir, 'epg.xml')):
|
||||
show_notification(addon.getLocalizedString(30324))
|
||||
return
|
||||
save_iptv_settings(filename, 'KodiMov+', 'kodimovplus', epg_url)
|
||||
# Show Movistar's own channel numbers instead of 1, 2, 3...
|
||||
xbmc.executeJSONRPC(json.dumps({'jsonrpc': '2.0', 'id': 1, 'method': 'Settings.SetSettingValue',
|
||||
'params': {'setting': 'pvrmanager.usebackendchannelnumbers', 'value': True}}))
|
||||
export_epg_now()
|
||||
# Restart IPTV Simple so it loads the new instance and channel list.
|
||||
for enabled in (False, True):
|
||||
xbmc.executeJSONRPC(json.dumps({'jsonrpc': '2.0', 'id': 1, 'method': 'Addons.SetAddonEnabled',
|
||||
|
||||
Reference in new issue
Block a user