From 8672edbf6f4eb8c6f57a84be6101cdda421de501 Mon Sep 17 00:00:00 2001 From: mediaminister <45148099+mediaminister@users.noreply.github.com> Date: Tue, 17 Sep 2024 19:16:16 +0200 Subject: [PATCH] Fix geoblocked error message (#1186) --- resources/lib/streamservice.py | 2 +- tests/test_streamservice.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/lib/streamservice.py b/resources/lib/streamservice.py index e05f1cf8..dfe77b7b 100644 --- a/resources/lib/streamservice.py +++ b/resources/lib/streamservice.py @@ -25,7 +25,7 @@ class StreamService: _UPLYNK_LICENSE_URL = 'https://content.uplynk.com/wv' _INVALID_LOCATION = 'INVALID_LOCATION' _INCOMPLETE_ROAMING_CONFIG = 'INCOMPLETE_ROAMING_CONFIG' - _BELGIUM_ONLY = 'CONTENT_AVAILABLE_ONLY_FOR_BE_RESIDENTS' + _BELGIUM_ONLY = 'CONTENT_AVAILABLE_ONLY_IN_BE' _GEOBLOCK_ERROR_CODES = (_INCOMPLETE_ROAMING_CONFIG, _INVALID_LOCATION, _BELGIUM_ONLY) def __init__(self, _tokenresolver): diff --git a/tests/test_streamservice.py b/tests/test_streamservice.py index da1859a8..abeed270 100644 --- a/tests/test_streamservice.py +++ b/tests/test_streamservice.py @@ -89,12 +89,11 @@ def test_get_ondemand_stream_from_from_videoid_geoblocked(self): """Test getting stream from geoblocked video_id""" # Undercover S01E01 video = { - 'video_url': None, 'video_id': 'vid-b77b58cb-eebf-4b00-b772-0d6b4caad6a5', - 'publication_id': None, + 'publication_id': 'pbs-pub-8a1068a5-cffc-4b25-96cc-2b15b3c513dc', } stream = self._streamservice.get_stream(video) - self.assertTrue(stream is None) + self.assertTrue(stream is not None) @unittest.skipUnless(addon.settings.get('username'), 'Skipping as VRT username is missing.') @unittest.skipUnless(addon.settings.get('password'), 'Skipping as VRT password is missing.')