update
This commit is contained in:
parent
f948382084
commit
63cf4a4e59
@ -19,7 +19,7 @@ class CBZUtils:
|
||||
return data
|
||||
|
||||
@classmethod
|
||||
def zip_compression(cls,source_dir, target_file,type=None):
|
||||
def zip_compression(cls,source_dir, target_file):
|
||||
msg = {}
|
||||
target_dir = os.path.dirname(target_file)
|
||||
if not os.path.exists(target_dir):
|
||||
@ -43,10 +43,6 @@ class CBZUtils:
|
||||
return msg
|
||||
else:
|
||||
print("文件已存在:", target_file)
|
||||
|
||||
if type == "delete":
|
||||
shutil.rmtree(source_dir)
|
||||
print(f"已删除 source_dir: {source_dir}")
|
||||
|
||||
@classmethod
|
||||
def packAutoComicChapterCBZ(cls):
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
import json,os,time,random
|
||||
from utils.comic.ComicStr import comicStr
|
||||
import json,os,time,random,shutil
|
||||
from utils.ComicUtils import comicUtils
|
||||
from utils.FileUtils import fileUtils
|
||||
from utils.comic.PathStr import pathStr
|
||||
from utils.NetUtils import netUtils
|
||||
from utils.HtmlUtils import htmlUtils
|
||||
from utils.ImageUtils import imageUtils
|
||||
@ -93,6 +90,10 @@ class comicEntity:
|
||||
if comicInfo.nextExistsGetPath("cbz_"):
|
||||
#下载后自动打包
|
||||
CBZUtils.packAutoComicChapterCBZ()
|
||||
#完成删除原文件
|
||||
remove_path = comicInfo.getDirComicChapter()
|
||||
shutil.rmtree(remove_path)
|
||||
print(f"文件已删除: {remove_path}")
|
||||
if not sleep == None:
|
||||
print(f"{sleep} 秒后开始下载下一个章节")
|
||||
time.sleep(sleep)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user