This commit is contained in:
caiwx86 2025-02-10 20:38:04 +08:00
parent 0d4897fc49
commit 44dec40bde

13
test.py
View File

@ -120,7 +120,16 @@ class comicInfo:
# 收集图片路径
image_paths = [page.get('Image') for page in page_list if page.get('Image')]
if len(image_paths) == 0:
raise exit(f"{cbz_path} {image_paths} 为空")
print(f"{cbz_path} {image_paths} 为空")
img_count = 1
while 1:
actual_path = self.find_actual_path(cbz, "{:0>3d}".format(img_count)+".jpg")
if actual_path:
image_paths.append("{:0>3d}".format(img_count))
img_count += 1
else:
break
print(f"生成新的paths{image_paths}")
# 处理每个图片文件
for img_path in image_paths:
actual_path = self.find_actual_path(cbz, img_path+".jpg")
@ -277,7 +286,7 @@ if __name__ == "__main__":
create_time = time.localtime(os.path.getctime(file)) # 注意st_birthtime 在Linux/MacOS中可用但不是所有系统都支持
# 格式化时间
formatted_time = time.strftime('%Y%m%d', create_time)
if int(formatted_time) < 20250204:
if int(formatted_time) > 20250204:
print(f"{file} 文件创建时间:", formatted_time)
comicInfo().update_comicinfo_cbz(file)
#if size < 3000: