mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
svtplay: Catch media without any videoReferences
This happens when they publish information about the TV episode before publishing the video stream. Probably due to some bug in SVT Play. The web player is also unable the play the video, reporting "Can't play the program, try again later".
This commit is contained in:
parent
c453f7c48b
commit
647fed8bda
@ -75,6 +75,10 @@ class Svtplay(Service, OpenGraphThumbMixin):
|
||||
if options.force_subtitle:
|
||||
return
|
||||
|
||||
if len(data["video"].get("videoReferences", [])) == 0:
|
||||
yield ServiceError("Media doesn't have any associated videos (yet?)")
|
||||
return
|
||||
|
||||
for i in data["video"]["videoReferences"]:
|
||||
parse = urlparse(i["url"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user