]> code.delx.au - webdl/commitdiff
iview: don't blow up if video is unavailable
authorJames Bunton <jamesbunton@delx.net.au>
Sun, 24 Feb 2019 00:04:14 +0000 (11:04 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Sun, 24 Feb 2019 00:04:14 +0000 (11:04 +1100)
iview.py

index b41aa3eb747ab53131ee19bf00b9f5210e6d987f..dc1ea7c7a0dd29ad81d4b990dd0689abeded555f 100644 (file)
--- a/iview.py
+++ b/iview.py
@@ -53,6 +53,8 @@ class IviewEpisodeNode(Node):
 
     def download(self):
         info = grab_json(API_URL + "/programs/" + self.video_key)
+        if "playlist" not in info:
+            return False
         video_url = self.find_hls_url(info["playlist"])
         token, token_hostname= self.get_auth_details()
         video_url = self.add_auth_token_to_url(video_url, token, token_hostname)