]> code.delx.au - webdl/commitdiff
Improved error message for SBS
authorJames Bunton <jamesbunton@delx.net.au>
Thu, 17 Oct 2013 08:28:09 +0000 (19:28 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Thu, 17 Oct 2013 08:28:09 +0000 (19:28 +1100)
sbs.py

diff --git a/sbs.py b/sbs.py
index f34e429f07468eb8dea05d350766169119b6cd79..4af3632a28b7fc8323ae6c060c9ecabca8810d14 100644 (file)
--- a/sbs.py
+++ b/sbs.py
@@ -47,6 +47,8 @@ class SbsNode(Node):
 
                video = doc.xpath("//smil:video", namespaces=NS)[0]
                video_url = video.attrib["src"]
+               if not video_url:
+                       raise Exception("Unsupported video '%s': %s" % (self.title, desc_url))
                ext = urlparse.urlsplit(video_url).path.rsplit(".", 1)[1]
                filename = self.title + "." + ext
                video_url = append_to_qs(video_url, VIDEO_MAGIC)