1.0.0+kodimov.8: guide refresh doesn't fail at random; retry after 30 min
datetime.strptime sometimes fails in Kodi's embedded Python ('NoneType'
object is not callable), which aborted the whole guide export. Build the
XMLTV times without it.
The service now checks every 30 minutes and refreshes when the files are
over 6 hours old, so a failed refresh is retried soon. write_if_changed
touches an unchanged file so its time means "last refreshed".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9faaa482fc
commit
5df60a1fb8
4 files changed
+27
-31
No files matched your search
@@ -1533,8 +1533,9 @@ class Movistar(object):
|
||||
if only_subscribed and not ch['subscribed']: continue
|
||||
for e in epg[ch['id']]:
|
||||
#LOG('* e:{}'.format(e))
|
||||
start = datetime.strptime(e['start'], "%Y-%m-%dT%H:%M:%SZ").strftime("%Y%m%d%H%M%S +0000")
|
||||
stop = datetime.strptime(e['stop'], "%Y-%m-%dT%H:%M:%SZ").strftime("%Y%m%d%H%M%S +0000")
|
||||
# 2026-11-10T08:00:00Z -> 20261110080000 +0000, without strptime: inside
|
||||
# Kodi it fails at random ("'NoneType' object is not callable")
|
||||
start, stop = [re.sub(r'\D', '', e[k]) + ' +0000' for k in ('start', 'stop')]
|
||||
url = e.get('stream', None)
|
||||
if url:
|
||||
url = url.replace('&', '&')
|
||||
|
||||
Reference in new issue
Block a user