]> git.lizzy.rs Git - nhentai.git/commitdiff
add default value of output dir
authorRicterZ <ricterzheng@gmail.com>
Wed, 14 Oct 2020 18:09:09 +0000 (02:09 +0800)
committerRicterZ <ricterzheng@gmail.com>
Wed, 14 Oct 2020 18:09:09 +0000 (02:09 +0800)
nhentai/cmdline.py
nhentai/command.py

index 519279f3b52cd855ef3a6341729c767447fd197f..2d59309f50ffa7fefcc9e11c327a4429d1cca27e 100644 (file)
@@ -87,7 +87,7 @@ def cmd_parser():
                       choices=['recent', 'popular', 'popular-today', 'popular-week'])
 
     # download options
-    parser.add_option('--output', '-o', type='string', dest='output_dir', action='store', default='',
+    parser.add_option('--output', '-o', type='string', dest='output_dir', action='store', default='./',
                       help='output dir')
     parser.add_option('--threads', '-t', type='int', dest='threads', action='store', default=5,
                       help='thread count for downloading doujinshi')
index d0fce3dba577fb760b5343c1f4084c3dbf5c729c..47fbc3c3fe9350e72169b057e75ddff048d77404 100644 (file)
@@ -94,11 +94,8 @@ def main():
             elif options.is_pdf:
                 generate_pdf(options.output_dir, doujinshi, options.rm_origin_dir)
 
-        if options.main_viewer and options.output_dir:
+        if options.main_viewer:
             generate_main_html(options.output_dir)
-        elif options.main_viewer:
-            generate_main_html()
-
 
         if not platform.system() == 'Windows':
             logger.log(15, '🍻 All done.')