mirror of
				https://github.com/RicterZ/nhentai.git
				synced 2025-11-04 02:50:55 +01:00 
			
		
		
		
	fix file not found error when cbz file exists.
This commit is contained in:
		@@ -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):
 | 
					def generate_cbz(output_dir='.', doujinshi_obj=None, rm_origin_dir=False, write_comic_info=True):
 | 
				
			||||||
    if doujinshi_obj is not None:
 | 
					    if doujinshi_obj is not None:
 | 
				
			||||||
        doujinshi_dir = os.path.join(output_dir, doujinshi_obj.filename)
 | 
					        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:
 | 
					        if write_comic_info:
 | 
				
			||||||
            serialize_comic_xml(doujinshi_obj, doujinshi_dir)
 | 
					            serialize_comic_xml(doujinshi_obj, doujinshi_dir)
 | 
				
			||||||
        cbz_filename = os.path.join(os.path.join(doujinshi_dir, '..'), f'{doujinshi_obj.filename}.cbz')
 | 
					        cbz_filename = os.path.join(os.path.join(doujinshi_dir, '..'), f'{doujinshi_obj.filename}.cbz')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user