added md5 calculation param
This commit is contained in:
parent
afa17379a4
commit
31b6346cbc
@ -189,6 +189,8 @@ def _real_main(argv=None):
|
|||||||
if opts.allsubtitles and not opts.writeautomaticsub:
|
if opts.allsubtitles and not opts.writeautomaticsub:
|
||||||
opts.writesubtitles = True
|
opts.writesubtitles = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
outtmpl = ((opts.outtmpl is not None and opts.outtmpl) or
|
outtmpl = ((opts.outtmpl is not None and opts.outtmpl) or
|
||||||
(opts.format == '-1' and opts.usetitle and '%(title)s-%(id)s-%(format)s.%(ext)s') or
|
(opts.format == '-1' and opts.usetitle and '%(title)s-%(id)s-%(format)s.%(ext)s') or
|
||||||
(opts.format == '-1' and '%(id)s-%(format)s.%(ext)s') or
|
(opts.format == '-1' and '%(id)s-%(format)s.%(ext)s') or
|
||||||
@ -372,6 +374,7 @@ def _real_main(argv=None):
|
|||||||
'external_downloader_args': external_downloader_args,
|
'external_downloader_args': external_downloader_args,
|
||||||
'postprocessor_args': postprocessor_args,
|
'postprocessor_args': postprocessor_args,
|
||||||
'cn_verification_proxy': opts.cn_verification_proxy,
|
'cn_verification_proxy': opts.cn_verification_proxy,
|
||||||
|
'md5': opts.md5
|
||||||
}
|
}
|
||||||
|
|
||||||
with YoutubeDL(ydl_opts) as ydl:
|
with YoutubeDL(ydl_opts) as ydl:
|
||||||
|
@ -175,6 +175,11 @@ def parseOpts(overrideArguments=None):
|
|||||||
action='store_true', dest='no_color',
|
action='store_true', dest='no_color',
|
||||||
default=False,
|
default=False,
|
||||||
help='Do not emit color codes in output')
|
help='Do not emit color codes in output')
|
||||||
|
general.add_option(
|
||||||
|
'--md5',
|
||||||
|
action='store_true', dest='md5',
|
||||||
|
default=False,
|
||||||
|
help='Calculate md5 of video and save in file')
|
||||||
|
|
||||||
network = optparse.OptionGroup(parser, 'Network Options')
|
network = optparse.OptionGroup(parser, 'Network Options')
|
||||||
network.add_option(
|
network.add_option(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user