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:
1 parent
066a203e9e
commit
235f7a6cab
4 files changed
+9
-8
No files matched your search
Binary file not shown.
Binary file not shown.
@@ -38,7 +38,7 @@ EXTRA_CHANNELS = [
|
|||||||
'url': 'https://crtvg-tvg2.flumotion.cloud/playlist.m3u8'},
|
'url': 'https://crtvg-tvg2.flumotion.cloud/playlist.m3u8'},
|
||||||
{'id': 'TeleVigo', 'name': 'TeleVigo', 'chno': 155, 'group': 'Galicia',
|
{'id': 'TeleVigo', 'name': 'TeleVigo', 'chno': 155, 'group': 'Galicia',
|
||||||
'logo': 'https://i.imgur.com/4iVmlFa.png',
|
'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}'
|
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():
|
def extra_channels_m3u8():
|
||||||
items = []
|
"""Returns [(channel number, m3u8 entry)]."""
|
||||||
for c in EXTRA_CHANNELS:
|
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))
|
||||||
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))
|
for c in EXTRA_CHANNELS]
|
||||||
return ''.join(items)
|
|
||||||
|
|
||||||
|
|
||||||
def write_if_changed(filename, content):
|
def write_if_changed(filename, content):
|
||||||
|
|||||||
@@ -1418,10 +1418,12 @@ class Movistar(object):
|
|||||||
if 'cas_id' in t: url += '&cas_id=' + t['cas_id']
|
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(
|
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"')
|
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:
|
if self.add_extra_channels:
|
||||||
items.append(kodimov.extra_channels_m3u8())
|
items.extend(kodimov.extra_channels_m3u8())
|
||||||
res = '#EXTM3U\n## KodiMov+\n{}'.format(''.join(items))
|
# 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)
|
return kodimov.write_if_changed(filename, res)
|
||||||
|
|
||||||
def export_epg(self, date=None, duration=2):
|
def export_epg(self, date=None, duration=2):
|
||||||
|
|||||||
Reference in new issue
Block a user