1.0.0+kodimov.3: one-tap TV guide setup

"Create settings for IPTV Simple" now also:
- turns on Kodi's "use backend channel numbers", so the guide shows
  Movistar's numbers
- reloads the channel list daily at 04:00
- restarts IPTV Simple so the new setup loads without restarting Kodi
and writes valid XML (the catch-up format had a bare &).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xockoandClaude Opus 5.5 committed 2026-11-07 11:59:01 +01:00
1 parent 119002fbbf
commit c4a0a7e97d
5 files changed
+13 -4

No files matched your search

Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -15,7 +15,7 @@ def save_iptv_settings(filename, name, addon_id, epg_url=None):
<setting id="m3uCache" default="true">true</setting>
<setting id="startNum" default="true">1</setting>
<setting id="numberByOrder" default="true">false</setting>
<setting id="m3uRefreshMode" default="true">0</setting>
<setting id="m3uRefreshMode">2</setting>
<setting id="m3uRefreshIntervalMins" default="true">60</setting>
<setting id="m3uRefreshHour" default="true">4</setting>
<setting id="connectioncheckinterval" default="true">10</setting>
@@ -82,7 +82,7 @@ def save_iptv_settings(filename, name, addon_id, epg_url=None):
content += '''
<setting id="catchupEnabled">true</setting>
<setting id="catchupQueryFormat">&start_time={utc}&end_time={utcend}</setting>
<setting id="catchupQueryFormat">&amp;start_time={utc}&amp;end_time={utcend}</setting>
<setting id="allChannelsCatchupMode">2</setting>'''
content += '''
+8
View File
@@ -766,7 +766,15 @@ def create_iptv_settings():
res = xbmcgui.Dialog().yesno(addon.getLocalizedString(30322), addon.getLocalizedString(30323))
if res == False: 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',
'params': {'addonid': 'pvr.iptvsimple', 'enabled': enabled}}))
xbmc.sleep(3000)
except:
show_notification(addon.getLocalizedString(30324))