Skip to content

Commit ff10d48

Browse files
authored
Merge pull request #4649 from mediaminister/plugin.video.vrt.nu@matrix
[plugin.video.vrt.nu@matrix] 2.5.37+matrix.1
2 parents 559bebc + 2718be3 commit ff10d48

3 files changed

Lines changed: 10 additions & 19 deletions

File tree

plugin.video.vrt.nu/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ leave a message at [our Facebook page](https://facebook.com/kodivrtnu/).
5959
</table>
6060

6161
## Releases
62+
### v2.5.37 (2025-04-04)
63+
- Fix DRM streams (@mediaminister)
64+
6265
### v2.5.36 (2025-03-03)
6366
- Fix program listings (@malc0mn)
6467

plugin.video.vrt.nu/addon.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.video.vrt.nu" name="VRT MAX" version="2.5.36+matrix.1" provider-name="Martijn Moreel, dagwieers, mediaminister">
2+
<addon id="plugin.video.vrt.nu" name="VRT MAX" version="2.5.37+matrix.1" provider-name="Martijn Moreel, dagwieers, mediaminister">
33
<requires>
44
<import addon="resource.images.studios.white" version="0.0.22"/>
55
<import addon="script.module.beautifulsoup4" version="4.6.2"/>
@@ -42,6 +42,9 @@
4242
<website>https://github.com/add-ons/plugin.video.vrt.nu/wiki</website>
4343
<source>https://github.com/add-ons/plugin.video.vrt.nu</source>
4444
<news>
45+
v2.5.37 (2025-04-04)
46+
- Fix DRM streams
47+
4548
v2.5.36 (2025-03-03)
4649
- Fix program listings
4750

plugin.video.vrt.nu/resources/lib/streamservice.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
class StreamService:
2020
"""Collect and prepare stream info for Kodi Player"""
2121

22-
_VUPLAY_API_URL = 'https://api.vuplay.co.uk'
2322
_VUALTO_API_URL = 'https://media-services-public.vrt.be/media-aggregator/v2'
2423
_CLIENT = 'vrtnu-web@PROD'
24+
_VUALTO_LICENSE_URL = 'https://widevine-proxy.drm.technology/proxy'
2525
_UPLYNK_LICENSE_URL = 'https://content.uplynk.com/wv'
2626
_INVALID_LOCATION = 'INVALID_LOCATION'
2727
_INCOMPLETE_ROAMING_CONFIG = 'INCOMPLETE_ROAMING_CONFIG'
@@ -34,20 +34,6 @@ def __init__(self, _tokenresolver):
3434
self._create_settings_dir()
3535
self._can_play_drm = can_play_drm()
3636

37-
def _get_vualto_license_url(self):
38-
"""Get Widevine license URL from Vualto API"""
39-
# Try cache
40-
data = get_cache('vualto_license_url.json')
41-
if data:
42-
return data.get('la_url')
43-
44-
vualto_license_url = get_url_json(url=self._VUPLAY_API_URL, fail={}).get('drm_providers', {}).get('widevine', {})
45-
if vualto_license_url:
46-
from json import dumps
47-
vualto_license_url.update(expirationDate=generate_expiration_date(hours=168))
48-
update_cache('vualto_license_url.json', dumps(vualto_license_url))
49-
return vualto_license_url.get('la_url')
50-
5137
@staticmethod
5238
def _create_settings_dir():
5339
"""Create settings directory"""
@@ -111,7 +97,7 @@ def _get_stream_json(self, api_data, roaming=False):
11197
from json import dumps
11298
# Warning: Currently, the drmExpired key in the stream_json cannot be used because it provides a wrong 6 hour ttl for the VUDRM tokens.
11399
# After investigation these tokens seem to have an expiration time of only two hours, so we set the expirationDate value accordingly.
114-
stream_json.update(expirationDate=generate_expiration_date(hours=2), vualto_license_url=self._get_vualto_license_url())
100+
stream_json.update(expirationDate=generate_expiration_date(hours=2))
115101
cache_file = api_data.video_id + '.json'
116102
update_cache(cache_file, dumps(stream_json))
117103
return stream_json
@@ -172,7 +158,6 @@ def get_stream(self, video, roaming=False, api_data=None):
172158
uplynk = 'uplynk.com' in stream_json.get('targetUrls')[0].get('url')
173159

174160
vudrm_token = stream_json.get('drm')
175-
vualto_license_url = stream_json.get('vualto_license_url') or self._get_vualto_license_url()
176161
drm_stream = (vudrm_token or uplynk)
177162

178163
# Select streaming protocol
@@ -222,7 +207,7 @@ def get_stream(self, video, roaming=False, api_data=None):
222207
if vudrm_token:
223208
stream = StreamURLS(
224209
manifest_url,
225-
license_url=vualto_license_url,
210+
license_url=self._VUALTO_LICENSE_URL,
226211
license_headers={'X-VUDRM-TOKEN': vudrm_token},
227212
use_inputstream_adaptive=True
228213
)

0 commit comments

Comments
 (0)