]> code.delx.au - webdl/commitdiff
Drop livestreamer support, it probably didn't work anymore anyway
authorJames Bunton <jamesbunton@delx.net.au>
Mon, 13 Apr 2020 11:11:32 +0000 (21:11 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Mon, 13 Apr 2020 11:11:32 +0000 (21:11 +1000)
common.py

index 9a873f698b709cf56a1fbbb70779f179ebeac391..05d344cd5e49a19f26d19bd83b671a8b7c4b3f43 100644 (file)
--- a/common.py
+++ b/common.py
@@ -169,16 +169,6 @@ def find_ffprobe():
 
     raise Exception("You must install ffmpeg or libav-tools")
 
 
     raise Exception("You must install ffmpeg or libav-tools")
 
-def find_streamlink():
-    if check_command_exists(["streamlink", "--help"]):
-        return "streamlink"
-
-    if check_command_exists(["livestreamer", "--help"]):
-        logging.warn("Detected livestreamer! streamlink is recommended")
-        return "livestreamer"
-
-    raise Exception("You must install streamlink or livestreamer")
-
 def get_duration(filename):
     ffprobe = find_ffprobe()
 
 def get_duration(filename):
     ffprobe = find_ffprobe()
 
@@ -275,8 +265,6 @@ def convert_to_mp4(filename):
 
 
 def download_hds(filename, video_url, pvswf=None):
 
 
 def download_hds(filename, video_url, pvswf=None):
-    streamlink = find_streamlink()
-
     filename = sanify_filename(filename)
     logging.info("Downloading: %s", filename)
 
     filename = sanify_filename(filename)
     logging.info("Downloading: %s", filename)
 
@@ -287,9 +275,9 @@ def download_hds(filename, video_url, pvswf=None):
         param = video_url
 
     cmd = [
         param = video_url
 
     cmd = [
-        streamlink,
-        "-f",
-        "-o", filename,
+        "streamlink",
+        "--force",
+        "--output", filename,
         param,
         "best",
     ]
         param,
         "best",
     ]
@@ -299,16 +287,14 @@ def download_hds(filename, video_url, pvswf=None):
         return False
 
 def download_hls(filename, video_url):
         return False
 
 def download_hls(filename, video_url):
-    streamlink = find_streamlink()
-
     filename = sanify_filename(filename)
     video_url = "hlsvariant://" + video_url
     logging.info("Downloading: %s", filename)
 
     cmd = [
     filename = sanify_filename(filename)
     video_url = "hlsvariant://" + video_url
     logging.info("Downloading: %s", filename)
 
     cmd = [
-        streamlink,
-        "-f",
-        "-o", filename,
+        "streamlink",
+        "--force",
+        "--output", filename,
         video_url,
         "best",
     ]
         video_url,
         "best",
     ]
@@ -318,16 +304,14 @@ def download_hls(filename, video_url):
         return False
 
 def download_mpd(filename, video_url):
         return False
 
 def download_mpd(filename, video_url):
-    streamlink = find_streamlink()
-
     filename = sanify_filename(filename)
     video_url = "dash://" + video_url
     logging.info("Downloading: %s", filename)
 
     cmd = [
     filename = sanify_filename(filename)
     video_url = "dash://" + video_url
     logging.info("Downloading: %s", filename)
 
     cmd = [
-        streamlink,
-        "-f",
-        "-o", filename,
+        "streamlink",
+        "--force",
+        "--output", filename,
         video_url,
         "best",
     ]
         video_url,
         "best",
     ]