From 971c44117bb5c97a5637196ddb556edbc46cdb4a Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sun, 3 Mar 2013 11:07:10 +0100 Subject: [PATCH] download_hls: add support for relative urls --- lib/svtplay/hls.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/svtplay/hls.py b/lib/svtplay/hls.py index 502d34d..2d94d2f 100644 --- a/lib/svtplay/hls.py +++ b/lib/svtplay/hls.py @@ -24,6 +24,8 @@ def download_hls(options, url, baseurl=None): streams[int(i[1]["BANDWIDTH"])] = i[0] test = select_quality(options, streams) + if baseurl and test[:4] != 'http': + test = "%s/%s" % (baseurl, test) m3u8 = get_http_data(test) globaldata, files = parsem3u(m3u8) encrypted = False