Sort the TV guide list by channel number; direct TeleVigo stream

Kodi lists channels in file order, so TVG2 and TeleVigo showed up last.
TeleVigo's master playlist points to an ad server URL with unfilled
placeholders that Kodi can't open; use the direct playlist instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xockoandClaude Opus 5.5 committed 2026-11-07 10:46:10 +01:00
1 parent 066a203e9e
commit 235f7a6cab
4 files changed
+9 -8

No files matched your search

Binary file not shown.
Binary file not shown.
+4 -5
View File
@@ -38,7 +38,7 @@ EXTRA_CHANNELS = [
'url': 'https://crtvg-tvg2.flumotion.cloud/playlist.m3u8'},
{'id': 'TeleVigo', 'name': 'TeleVigo', 'chno': 155, 'group': 'Galicia',
'logo': 'https://i.imgur.com/4iVmlFa.png',
'url': 'https://cloud.fastchannel.es/mic/manifiest/hls/televigo/televigo.m3u8'},
'url': 'https://stream-us-east-1.getpublica.com/playlist.m3u8?network_id=12687'},
]
AUTOLOGIN_URL = 'https://soter-pf.svp.video.telefonicaservices.com/service/login/autologin?deviceId={device}&deviceType=webplayer&_={ts}'
@@ -151,10 +151,9 @@ def network_login(m, account_number):
def extra_channels_m3u8():
items = []
for c in EXTRA_CHANNELS:
items.append('#EXTINF:-1 tvg-name="{name}" tvg-id="{id}" tvg-logo="{logo}" tvg-chno="{chno}" group-title="{group}",{name}\n{url}\n\n'.format(**c))
return ''.join(items)
"""Returns [(channel number, m3u8 entry)]."""
return [(c['chno'], '#EXTINF:-1 tvg-name="{name}" tvg-id="{id}" tvg-logo="{logo}" tvg-chno="{chno}" group-title="{group}",{name}\n{url}\n\n'.format(**c))
for c in EXTRA_CHANNELS]
def write_if_changed(filename, content):
+5 -3
View File
@@ -1418,10 +1418,12 @@ class Movistar(object):
if 'cas_id' in t: url += '&cas_id=' + t['cas_id']
item = '#EXTINF:-1 tvg-name="{name}" tvg-id="{id}" tvg-logo="{logo}" tvg-chno="{preset}" {catchup} group-title="Movistar+",{name}\n{stream}\n\n'.format(
name=t['name'], id=t['id'], logo=t['logo'], preset=t['preset'], stream=url, catchup='catchup="default" catchup-source="{catchup-id}" catchup-days="7"')
items.append(item)
items.append((int(t['preset'] or 0), item))
if self.add_extra_channels:
items.append(kodimov.extra_channels_m3u8())
res = '#EXTM3U\n## KodiMov+\n{}'.format(''.join(items))
items.extend(kodimov.extra_channels_m3u8())
# Kodi lists channels in file order, so keep it in channel number order.
items.sort(key=lambda x: x[0])
res = '#EXTM3U\n## KodiMov+\n{}'.format(''.join(i for _, i in items))
return kodimov.write_if_changed(filename, res)
def export_epg(self, date=None, duration=2):