1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

tv4play: better message if the video is not available

fixes: #981
This commit is contained in:
Johan Andersson 2018-10-28 16:37:58 +01:00
parent 0596ee743b
commit 647d119ce8

View File

@ -74,7 +74,7 @@ class Tv4play(Service, OpenGraphThumbMixin):
url = "https://playback-api.b17g.net/media/{}?service=tv4&device=browser&protocol=hls%2Cdash&drm=widevine".format(vid)
res = self.http.request("get", url, cookies=self.cookies)
if res.status_code > 200:
yield ServiceError("Can't play this because the video is geoblocked.")
yield ServiceError("Can't play this because the video is geoblocked or not available.")
return
if res.json()["playbackItem"]["type"] == "hls":
streams = hlsparse(self.config, self.http.request("get", res.json()["playbackItem"]["manifestUrl"]),