]> git.lizzy.rs Git - nhentai.git/commitdiff
fix --gen-main action
authorsymant233 <symant233@gmail.com>
Wed, 29 May 2019 05:43:47 +0000 (13:43 +0800)
committersymant233 <symant233@gmail.com>
Wed, 29 May 2019 05:43:47 +0000 (13:43 +0800)
nhentai/cmdline.py
nhentai/command.py

index 9e153596a78a844486e023255c9d035e6715e00e..2b87250f46e3a7ca5cef324129adba634dcc4109 100644 (file)
@@ -103,7 +103,7 @@ def cmd_parser():
         generate_html()
         exit(0)
 
-    if args.main_viewer:
+    if args.main_viewer and not args.favorites and args.id is None and not args.is_download:
         generate_main_html()
         exit(0)
 
index 88a8c97df0bd2f606636010fb51c31df3b489a67..907ec29d9e28e47ce720eccb5ef6818fc05c4f98 100644 (file)
@@ -16,8 +16,13 @@ from nhentai.utils import generate_html, generate_cbz, generate_main_html
 
 def main():
     banner()
-    logger.info('Using mirror: {0}'.format(BASE_URL))
     options = cmd_parser()
+    logger.info('Using mirror: {0}'.format(BASE_URL))
+
+    from nhentai.constant import PROXY 
+    # constant.PROXY will be changed after cmd_parser()
+    if PROXY != {}:
+        logger.info('Using proxy: {0}'.format(PROXY))
 
     doujinshi_ids = []
     doujinshi_list = []