Skip to content

Commit

Permalink
Merge pull request #311 from RicterZ/dev
Browse files Browse the repository at this point in the history
Dev merge to master
  • Loading branch information
RicterZ authored Mar 28, 2024
2 parents 473f948 + 4ecffaf commit dc54a43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nhentai/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def cmd_parser():
_ = [i.strip() for i in f.readlines()]
args.id = set(int(i) for i in _ if i.isdigit())

if (args.is_download or args.is_show) and not args.id and not args.keyword and not args.favorites:
if (args.is_download or args.is_show) and not args.id and not args.keyword and not args.favorites and not args.artist:
logger.critical('Doujinshi id(s) are required for downloading')
parser.print_help()
sys.exit(1)
Expand Down
3 changes: 3 additions & 0 deletions nhentai/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ def generate_main_html(output_dir='./'):
def generate_cbz(output_dir='.', doujinshi_obj=None, rm_origin_dir=False, write_comic_info=True, move_to_folder=False):
if doujinshi_obj is not None:
doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
if os.path.exists(doujinshi_dir+".cbz"):
logger.warning(f'Comic Book CBZ file exists, skip "{doujinshi_dir}"')
return
if write_comic_info:
serialize_comic_xml(doujinshi_obj, doujinshi_dir)
cbz_filename = os.path.join(os.path.join(doujinshi_dir, '..'), f'{doujinshi_obj.filename}.cbz')
Expand Down

0 comments on commit dc54a43

Please sign in to comment.