mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Add default value for 'hls_time_stamp', Add live protocol prio
This commit is contained in:
parent
938bb81a1b
commit
709618068e
@ -167,6 +167,7 @@ class Options(object):
|
||||
self.remux = False
|
||||
self.silent_semi = False
|
||||
self.proxy = None
|
||||
self.hls_time_stamp = False
|
||||
|
||||
def get_multiple_media(urls, options):
|
||||
if options.output and os.path.isfile(options.output):
|
||||
|
@ -32,6 +32,7 @@ FIREFOX_UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36
|
||||
|
||||
# TODO: should be set as the default option in the argument parsing?
|
||||
DEFAULT_PROTOCOL_PRIO = ["dash", "hls", "hds", "http", "rtmp"]
|
||||
LIVE_PROTOCOL_PRIO = ["hls", "dash", "hds", "http", "rtmp"]
|
||||
|
||||
log = logging.getLogger('svtplay_dl')
|
||||
progress_stream = sys.stderr
|
||||
@ -132,9 +133,13 @@ def select_quality(options, streams):
|
||||
|
||||
# Extract protocol prio, in the form of "hls,hds,http,rtmp",
|
||||
# we want it as a list
|
||||
proto_prio = DEFAULT_PROTOCOL_PRIO
|
||||
|
||||
if options.stream_prio:
|
||||
proto_prio = options.stream_prio.split(',')
|
||||
elif options.live or streams[0].options.live:
|
||||
proto_prio = LIVE_PROTOCOL_PRIO
|
||||
else:
|
||||
proto_prio = DEFAULT_PROTOCOL_PRIO
|
||||
|
||||
# Filter away any unwanted protocols, and prioritize
|
||||
# based on --stream-priority.
|
||||
|
Loading…
Reference in New Issue
Block a user