1.0.0+kodimov.12: no duplicate TV guide instance; retry the web player registration
- The TV guide setup always wrote instance-settings-91.xml, so on a box already set up with another instance (from the original add-on) both read channels.m3u8 and every channel showed twice. The setup now rewrites the instance that already reads the list, and the service deletes extra ones at start (keeps the one that isn't 91, which holds what was watched) and restarts IPTV Simple when nothing plays. - The web player registration for the new servers got one 401 error page and gave up, and the TV guide list then lacked LALIGA, DAZN LALIGA and Liga de Campeones until the next export 6 hours later. The registration is tried 3 times, and after a failure the service exports the list again every half hour, up to 6 times. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b3bc561c35
commit
69a37ff064
5 files changed
+71
-8
No files matched your search
+10
-1
@@ -31,9 +31,11 @@ if __name__ == '__main__':
|
||||
# also renews the 10-day Movistar login.
|
||||
next_check = time.time() + 60
|
||||
max_age = 0 # always refresh once after Kodi starts
|
||||
new_api_retries = 6
|
||||
try:
|
||||
pvr_dir = translatePath(xbmcaddon.Addon('pvr.iptvsimple').getAddonInfo('profile'))
|
||||
restart_iptv = kodimov.set_iptv_refresh(pvr_dir, 'kodimovplus')
|
||||
restart_iptv = kodimov.remove_duplicate_instances(pvr_dir, 'kodimovplus')
|
||||
restart_iptv = kodimov.set_iptv_refresh(pvr_dir, 'kodimovplus') or restart_iptv
|
||||
except RuntimeError: # IPTV Simple not installed or disabled
|
||||
pvr_dir = None
|
||||
restart_iptv = False
|
||||
@@ -55,6 +57,13 @@ if __name__ == '__main__':
|
||||
age_limit, max_age = max_age, 6 * 3600 - 120
|
||||
# After Kodi starts (or this add-on updates) also get the new guide into Kodi now
|
||||
reload_guide = '&reload_guide=1' if age_limit == 0 else ''
|
||||
# The new servers failed (they at times refuse everything for minutes):
|
||||
# the list lacks LALIGA, DAZN LALIGA, Liga de Campeones. Try again in
|
||||
# half an hour, a few times, instead of in 6 hours.
|
||||
if new_api_retries and kodimov.new_api_failed(profile_dir):
|
||||
new_api_retries -= 1
|
||||
age_limit = 0
|
||||
reload_guide = '&reload_guide=1'
|
||||
if addon.getSettingBool('auto_export_epg'): # channels + programme guide
|
||||
if file_age(os.path.join(profile_dir, 'epg.xml')) > age_limit:
|
||||
exporting = True
|
||||
|
||||
Reference in new issue
Block a user