1.0.0+kodimov.7: synopsis in the programme guide; hourly IPTV Simple reload
Movistar's guide already carries the synopsis (Resena), genre, year, age rating and pictures; write them to epg.xml. IPTV Simple was set to reload the channel list and guide once a day at 4:00, so a new epg.xml didn't reach Kodi until then. Use its hourly reload, which also makes Kodi fetch the guide again. The service switches existing TV guide setups over once and restarts IPTV Simple when nothing is playing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09d6a68f74
commit
9faaa482fc
6 files changed
+66
-10
No files matched your search
@@ -564,6 +564,13 @@ class Movistar(object):
|
||||
if 'TituloHorLinea2' in p:
|
||||
pr['desc2'] = p['TituloHorLinea2']
|
||||
pr['show_id'] = p['ShowId']
|
||||
# Synopsis, genre, year, age rating and picture come with the guide
|
||||
pr['plot'] = p.get('Resena') or ''
|
||||
pr['genre'] = p.get('GeneroComAntena') or ''
|
||||
pr['year'] = p.get('Anno') or ''
|
||||
pr['age_rating'] = (p.get('NivelMoral') or {}).get('Id') or ''
|
||||
images = {i.get('id'): i.get('uri') for i in (p.get('Imagenes') or [])}
|
||||
pr['image'] = images.get('horizontal') or images.get('default') or ''
|
||||
if 'SerialId' in p:
|
||||
pr['serie_id'] = p['SerialId']
|
||||
pr['id'] = p['Id']
|
||||
@@ -1454,6 +1461,9 @@ class Movistar(object):
|
||||
t['subtitle'] = e['desc2']
|
||||
t['start'] = datetime.utcfromtimestamp(e['start']/1000).strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||
t['stop'] = datetime.utcfromtimestamp(e['end']/1000).strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||
for key, field in (('description', 'plot'), ('image', 'image'), ('genre', 'genre'),
|
||||
('year', 'year'), ('age_rating', 'age_rating')):
|
||||
if e.get(field): t[key] = e[field]
|
||||
|
||||
if True:
|
||||
program_id = str(e['show_id'])
|
||||
@@ -1533,8 +1543,6 @@ class Movistar(object):
|
||||
'>\n' +
|
||||
' <title>{}</title>\n'.format(html_escape(e['title'])) +
|
||||
' <sub-title>{}</sub-title>\n'.format(html_escape(e['subtitle'])))
|
||||
if 'image' in e:
|
||||
res.append(' <icon src="{}"/>\n'.format(e['image']))
|
||||
if 'description' in e:
|
||||
res.append(' <desc>{}</desc>\n'.format(html_escape(e['description'])))
|
||||
if 'credits' in e and len(e['credits']) > 0:
|
||||
@@ -1545,6 +1553,14 @@ class Movistar(object):
|
||||
elif c['type'] == 'actor':
|
||||
res.append(' <actor>{}</actor>\n'.format(c['name']))
|
||||
res.append(' </credits>\n');
|
||||
if 'year' in e:
|
||||
res.append(' <date>{}</date>\n'.format(html_escape(e['year'])))
|
||||
if 'genre' in e:
|
||||
res.append(' <category>{}</category>\n'.format(html_escape(e['genre'])))
|
||||
if 'image' in e:
|
||||
res.append(' <icon src="{}"/>\n'.format(html_escape(e['image'])))
|
||||
if 'age_rating' in e:
|
||||
res.append(' <rating system="ES"><value>{}</value></rating>\n'.format(html_escape(e['age_rating'])))
|
||||
res.append('</programme>\n')
|
||||
if self.add_extra_channels:
|
||||
res.extend(kodimov.extra_channels_xmltv(self.net.session))
|
||||
|
||||
Reference in new issue
Block a user