Skip to content

Commit

Permalink
Fix geoblocked error message (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister authored Sep 17, 2024
1 parent fd792b8 commit 8672edb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/lib/streamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 2 additions & 3 deletions tests/test_streamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down

0 comments on commit 8672edb

Please sign in to comment.