mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-14 08:23:02 +08:00
--no-mtime now converted to docopt with proper boolean flipping
This commit is contained in:
parent
e2ab108c21
commit
dc7e144cde
@ -496,9 +496,9 @@ def parseOpts(overrideArguments=None):
|
||||
# dest='cookiefile', metavar='FILE', help='file to read cookies from and dump cookie jar in')
|
||||
#filesystem.add_option('--no-part',
|
||||
# action='store_true', dest='nopart', help='do not use .part files', default=False)
|
||||
filesystem.add_option('--no-mtime',
|
||||
action='store_false', dest='updatetime',
|
||||
help='do not use the Last-modified header to set the file modification time', default=True)
|
||||
#filesystem.add_option('--no-mtime',
|
||||
# action='store_false', dest='updatetime',
|
||||
# help='do not use the Last-modified header to set the file modification time', default=True)
|
||||
filesystem.add_option('--write-description',
|
||||
action='store_true', dest='writedescription',
|
||||
help='write video description to a .description file', default=False)
|
||||
@ -577,6 +577,8 @@ def _real_main(argv=None):
|
||||
opts['--continue'] = False
|
||||
else:
|
||||
opts['--continue'] = True
|
||||
#Invert boolean value of opts['--no-mtime']
|
||||
opts['--no-mtime'] = not opts['--no-mtime']
|
||||
|
||||
#parser, opts, args = parseOpts(argv)
|
||||
|
||||
@ -783,7 +785,7 @@ def _real_main(argv=None):
|
||||
'logtostderr': opts['--output'] == '-',
|
||||
'consoletitle': opts['--console-title'],
|
||||
'nopart': opts['--no-part'],
|
||||
'updatetime': opts.updatetime,
|
||||
'updatetime': opts['--no-mtime'],
|
||||
'writedescription': opts.writedescription,
|
||||
'writeinfojson': opts.writeinfojson,
|
||||
'writethumbnail': opts.writethumbnail,
|
||||
|
Loading…
Reference in New Issue
Block a user