fix
This commit is contained in:
1 parent
293179ba90
commit
e36431adf6
4 files changed
+19
-18
No files matched your search
+1
-1
@@ -121,7 +121,7 @@ class CBZUtils:
|
||||
with ZipFile(path, "r") as zip_file:
|
||||
result = zip_file.namelist()
|
||||
if filter:
|
||||
filter_icon = ci.COMIC_ICON_NAME+".jpg"
|
||||
filter_icon = ComicPath.COMIC_ICON_NAME+".jpg"
|
||||
filter_info_xml = ComicPath.COMIC_INFO_XML
|
||||
if filter_icon in result: result.remove(filter_icon)
|
||||
if filter_info_xml in result: result.remove(filter_info_xml)
|
||||
|
||||
+9
-11
@@ -248,16 +248,13 @@ class downloadUtils:
|
||||
if icon_url == None:
|
||||
print("icon 不存在,已跳过")
|
||||
return None
|
||||
save_name = ci.COMIC_ICON_NAME
|
||||
icon_suffix = "."+str(icon_url).split(".")[-1]
|
||||
icon_suffix = icon_suffix.split("?")[0]
|
||||
icon_suffix = str(icon_url).split(".")[-1]
|
||||
#判断漫画名路径是否已存在comicname/cover.jpg, 存在跳过
|
||||
path_comic_icon = os.path.join(ComicPath.getDirConfComic(),save_name+icon_suffix)
|
||||
if not ciUtils.equIcon() and fu.exists(path_comic_icon):
|
||||
os.remove(path_comic_icon)
|
||||
path_comic_icon = ComicPath.getPathConfComicIcon()
|
||||
if not ciUtils.equIcon() and fu.exists(path_comic_icon): os.remove(path_comic_icon)
|
||||
if fu.notExists(path_comic_icon):
|
||||
cls.download_images([icon_url],ComicPath.getDirConfComic(),files_name=[save_name+icon_suffix])
|
||||
save_path = os.path.join(ComicPath.getDirCBZComic(),Comic.getChapterName()+icon_suffix)
|
||||
cls.download_images([icon_url],ComicPath.getDirConfComic(),files_name=[ComicPath.COMIC_ICON_NAME+"."+icon_suffix])
|
||||
save_path = ComicPath.getPathCBZComicChapterIcon(icon_suffix)
|
||||
if is_new:
|
||||
#历史版本ICON
|
||||
if os.path.exists(save_path):
|
||||
@@ -265,11 +262,12 @@ class downloadUtils:
|
||||
if os.path.exists(path_comic_icon):
|
||||
base_dir = ComicPath.getDirComicChapter()
|
||||
if not os.path.exists(base_dir): os.makedirs(base_dir)
|
||||
shutil.copy(path_comic_icon,os.path.join(base_dir,save_name+icon_suffix))
|
||||
shutil.copy(path_comic_icon,os.path.join(base_dir,ComicPath.COMIC_ICON_NAME+icon_suffix))
|
||||
else:
|
||||
if fu.notExists(ComicPath.getDirCBZComic()): os.makedirs(ComicPath.getDirCBZComic())
|
||||
shutil.copy(path_comic_icon,save_path)
|
||||
print(f"{path_comic_icon} 已复制至: {save_path}")
|
||||
if fu.notExists(save_path):
|
||||
shutil.copy(path_comic_icon,save_path)
|
||||
print(f"{path_comic_icon} 已复制至: {save_path}")
|
||||
#保存icon信息
|
||||
ciUtils.iconDB()
|
||||
ciUtils.setProgressCBZ()
|
||||
Reference in new issue
Block a user