Skip to content

Commit

Permalink
Merge pull request #290 from olof/svtplay-no_video_refs_4_u
Browse files Browse the repository at this point in the history
svtplay: Catch media without any videoReferences
  • Loading branch information
spaam committed Oct 25, 2015
2 parents c453f7c + 647fed8 commit 8de637e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/svtplay_dl/service/svtplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ def get(self, options):
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"])

Expand Down

0 comments on commit 8de637e

Please sign in to comment.