fix
This commit is contained in:
parent
ec63ffd1de
commit
3c74f84ca4
@ -102,12 +102,19 @@ class ComicInfo:
|
||||
|
||||
@classmethod
|
||||
def writeComicInfoXML(cls,overlay=False):
|
||||
save_path = ComicPath.getPathComicInfoXML()
|
||||
if os.path.exists(save_path):
|
||||
if overlay:
|
||||
os.remove(save_path)
|
||||
logging.info(f"已存在文件,已删除... {save_path}")
|
||||
else:
|
||||
logging.info(f"已存在文件,跳过中... {save_path}")
|
||||
return True
|
||||
cls.initComicInfoXML()
|
||||
root = cls.root_node("ComicInfo")
|
||||
new_document = Document()
|
||||
new_document.appendChild(root)
|
||||
cls.add_nodes(root,ComicInfoEntity.getNodes())
|
||||
save_path = ComicPath.getPathComicInfoXML()
|
||||
with open(save_path, "w", encoding="utf-8") as fo:
|
||||
new_document.writexml(fo, indent='', addindent='\t', newl='\n', encoding="utf-8")
|
||||
fo.close()
|
||||
|
||||
@ -226,7 +226,7 @@ class fileUtils:
|
||||
img = Image.open(file_path)
|
||||
img.verify()
|
||||
img.close()
|
||||
logger.debug(f"{file_path} 类型为type:{type} size: {file_size_unit}")
|
||||
logger.info(f"{file_path} 类型为type:{type} size: {file_size_unit}")
|
||||
return True
|
||||
except:
|
||||
if os.path.exists(file_path):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user