1.0.0+kodimov.2: programme guide for every channel, TeleVigo on 15
- The amazon.tv guide that upstream 1.0.0 switched to is a flat list of programmes; group it by channel (the guide export crashed with KeyError) - Add TVG2/TeleVigo listings from the EPG_dobleM guide to epg.xml - Export channels + programme guide every 6 hours, by default, without on-screen notifications - TeleVigo moves to 15, near the generalist channels Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
235f7a6cab
commit
119002fbbf
11 files changed
+70
-26
No files matched your search
@@ -540,7 +540,16 @@ class Movistar(object):
|
||||
epg = {}
|
||||
if 'error' in data: return epg
|
||||
|
||||
# The amazon.tv guide is one flat list of programmes; webplayer's is
|
||||
# grouped by channel. Group the flat one the same way.
|
||||
if data and isinstance(data[0], dict):
|
||||
groups = {}
|
||||
for p in data:
|
||||
groups.setdefault(p['Canal']['CodCadenaTv'], []).append(p)
|
||||
data = list(groups.values())
|
||||
|
||||
for ch in data:
|
||||
if not ch: continue
|
||||
id = ch[0]['Canal']['CodCadenaTv']
|
||||
if not id in epg: epg[id] = []
|
||||
for p in ch:
|
||||
@@ -1537,9 +1546,10 @@ class Movistar(object):
|
||||
res.append(' <actor>{}</actor>\n'.format(c['name']))
|
||||
res.append(' </credits>\n');
|
||||
res.append('</programme>\n')
|
||||
if self.add_extra_channels:
|
||||
res.extend(kodimov.extra_channels_xmltv(self.net.session))
|
||||
res.append('</tv>\n')
|
||||
with io.open(filename, 'w', encoding='utf-8', newline='') as handle:
|
||||
handle.write(''.join(res))
|
||||
kodimov.write_if_changed(filename, ''.join(res))
|
||||
|
||||
def save_credentials(self, username, password):
|
||||
from .b64 import encode_base64
|
||||
|
||||
Reference in new issue
Block a user