diff --git a/resources/lib/channels/pl/tvp.py b/resources/lib/channels/pl/tvp.py index 2fe2a755d..ea8658089 100644 --- a/resources/lib/channels/pl/tvp.py +++ b/resources/lib/channels/pl/tvp.py @@ -140,6 +140,10 @@ def _get_live_stream_url(live_id): except Exception: return None + live_stream_status = live_streams.get('status', None) + if live_stream_status is not None and live_stream_status != 'OK': + return live_stream_status + live_stream_url = None if live_streams.get('formats', None) is not None: for stream_format in live_streams.get('formats'): @@ -165,5 +169,8 @@ def get_live_url(plugin, item_id, **kwargs): if live_stream_url is None: plugin.notify('INFO', plugin.localize(30716)) return False + if not live_stream_url.startswith('http'): + plugin.notify('INFO', plugin.localize(30891)) + return False return live_stream_url diff --git a/resources/lib/channels/pl/tvpabc.py b/resources/lib/channels/pl/tvpabc.py index ec0157a75..32de9aea5 100644 --- a/resources/lib/channels/pl/tvpabc.py +++ b/resources/lib/channels/pl/tvpabc.py @@ -15,6 +15,7 @@ 'tvpabc2': 'https://krainaabc.tvp.pl/sess/TVPlayer2/api.php?@method=getTvpConfig&@callback=__anthill_jsonp_401__&corsHost=krainaabc.tvp.pl&id=57181933' } + @Resolver.register def get_live_url(plugin, item_id, **kwargs): resp = urlquick.get(URL_LIVE[item_id],