added md5 calculation param

This commit is contained in:
kabaakaba 2015-08-28 15:45:18 +03:00
parent afa17379a4
commit 31b6346cbc
2 changed files with 12 additions and 4 deletions

View File

@ -189,6 +189,8 @@ def _real_main(argv=None):
if opts.allsubtitles and not opts.writeautomaticsub:
opts.writesubtitles = True
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 '%(id)s-%(format)s.%(ext)s') or
@ -372,6 +374,7 @@ def _real_main(argv=None):
'external_downloader_args': external_downloader_args,
'postprocessor_args': postprocessor_args,
'cn_verification_proxy': opts.cn_verification_proxy,
'md5': opts.md5
}
with YoutubeDL(ydl_opts) as ydl:

View File

@ -175,6 +175,11 @@ def parseOpts(overrideArguments=None):
action='store_true', dest='no_color',
default=False,
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.add_option(