From dc7e144cdec2b84712bb4ae6994fc5eef00af033 Mon Sep 17 00:00:00 2001 From: SavinaRoja Date: Sun, 6 Oct 2013 10:03:56 -0400 Subject: [PATCH] --no-mtime now converted to docopt with proper boolean flipping --- youtube_dl/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 1bf2015a4..e12b5cda0 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -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,