1.0.0+kodimov.10: LALIGA, DAZN LALIGA and Liga de Campeones play again

- These 25 channels are missing from the amazon.tv channel list and their
  streams answer 403 to the CDN token of the classic servers. They are now
  taken from the web player's channel list and guide and opened with a CDN
  token from Movistar's new servers (live and catch-up). Stream session and
  licence stay on the classic servers. The other channels are untouched.
- The new servers need a device registered as a web player and the Movistar
  home network: a box registered otherwise gets one extra registration;
  away from the home network the channels are not listed.
- The CDN token is used for its 12 hours and renewed in the background: the
  server that gives it out at times refuses everything for minutes.
- New setting, off by default: always play at the best quality, up to 1080p
  (InputStream Adaptive stays at 576p on these streams when left on automatic).
- Error 4027 is shown only when the retry after registering the device again
  fails too; the first licence request for these channels always gets it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
XoséandClaude Fable 5.2 committed 2026-11-13 13:17:20 +01:00
1 parent e16dd66f63
commit e72e3d4902
10 files changed
+337 -25

No files matched your search

+19 -3
View File
@@ -40,6 +40,7 @@ class Movistar(object):
add_extra_info = True
hide_unplayable = True
add_extra_channels = True
add_web_channels = True
#dplayer = 'webplayer'
#device_code = 'WP_OTT'
#manufacturer = 'Firefox'
@@ -548,6 +549,10 @@ class Movistar(object):
groups.setdefault(p['Canal']['CodCadenaTv'], []).append(p)
data = list(groups.values())
# The channels of the new servers aren't in the amazon.tv guide
if self.add_web_channels and not channels:
data = data + kodimov.web_only_epg(self, date, duration)
for ch in data:
if not ch: continue
id = ch[0]['Canal']['CodCadenaTv']
@@ -681,6 +686,10 @@ class Movistar(object):
if not 'error' in data:
self.cache.save_file(cache_filename, json.dumps(data, ensure_ascii=False))
# LALIGA, DAZN LALIGA and Liga de Campeones are only in the web player's list
if self.add_web_channels and isinstance(data, list):
data = data + kodimov.web_only_channels(self, data, profile, demarcation)
res = []
if 'error' in data: return res
@@ -709,6 +718,7 @@ class Movistar(object):
t['info']['playcount'] = 1 # Set as watched
t['uid'] = c.get('Uid')
t['watermark'] = bool(c.get('QMWatermark'))
t['new_api'] = bool(c.get('new_api'))
if False and 'links' in c:
for l in c['links']:
if l['rel'] == 'watermarks':
@@ -727,8 +737,11 @@ class Movistar(object):
res.append(t)
if any(t['new_api'] for t in res):
# Back in dial order (a stable sort: the rest of the list doesn't move)
res.sort(key=kodimov.dial_number)
if self.hide_unplayable:
res = [t for t in res if kodimov.is_playable(t)]
res = kodimov.playable_channels(self, res)
return res
def get_channels_with_epg(self):
@@ -1386,7 +1399,8 @@ class Movistar(object):
shutil.copyfile(self.cache.config_directory + 'credentials.json', filename)
def delete_session_files(self):
for f in ['access_token.conf', 'account.json', 'device_id.conf', 'devices.json', 'profile_id.conf', 'tokens.json', 'channels2.json', 'channels_UHD.json', 'channels_HD.json', 'epg2.json', 'epg_UHD.json', 'epg_HD.json', 'cdn.conf']:
for f in ['access_token.conf', 'account.json', 'device_id.conf', 'devices.json', 'profile_id.conf', 'tokens.json', 'channels2.json', 'channels_UHD.json', 'channels_HD.json', 'epg2.json', 'epg_UHD.json', 'epg_HD.json', 'cdn.conf',
'new_api.json', 'new_api.stamp', 'cdn_new.conf']:
self.cache.remove_file(f)
def get_profile_image_url(self, img_id):
@@ -1420,6 +1434,7 @@ class Movistar(object):
t['logo'] = c['art']['icon']
t['preset'] = c['dial']
args = urlencode({'action': 'play', 'stype': 'tv', 'id': c['id'], 'url': c['url'], 'session_request': c['session_request']})
if c.get('new_api'): args += '&new_api=1'
t['stream'] = 'plugin://plugin.video.kodimovplus/?' + args
if 'cas_id' in c: t['cas_id'] = c['cas_id']
res.append(t)
@@ -1454,6 +1469,7 @@ class Movistar(object):
for channel in channels:
id = channel['id']
if not id in epg: continue
new_api = '&new_api=1' if channel.get('new_api') else ''
res[id] = []
for e in epg[id]:
t = {}
@@ -1470,7 +1486,7 @@ class Movistar(object):
url = 'https://grmovistar.imagenio.telefonica.net/asfe/rest/tvMediaURLs?tvProgram.id='+ program_id +'&svc=startover'
session_request = '{"contentID":' + program_id +',"streamType":"CUTV"}'
args = urlencode({'action': 'play', 'stype': 'u7d', 'id': program_id, 'url': url, 'session_request': session_request})
t['stream'] = 'plugin://plugin.video.kodimovplus/?' + args
t['stream'] = 'plugin://plugin.video.kodimovplus/?' + args + new_api
if False and self.add_extra_info and id in ['HOLLYW', 'TCM', 'AMC', 'MV3', 'MV2', 'CPSER', 'FOXGE', 'TNT']:
i = {'id': e['id'], 'show_id': e['show_id']}