This commit is contained in:
cwx
2023-01-15 19:44:49 +08:00
parent 537b4d8827
commit d05897e11f
4 changed files with 58 additions and 13 deletions
+31 -5
View File
@@ -39,8 +39,9 @@ class comicInfo():
str_web = None
str_list_img = None
str_files_img = None
str_chapter_index= None
str_value1 = None
chapter_node = None
comicName_node = None
dep_node = None
@@ -216,6 +217,14 @@ class comicInfo():
value = ",".join(to_list)
return value
@classmethod
def setChapterIndex(cls,value):
cls.str_chapter_index = value
@classmethod
def getChapterIndex(cls):
return cls.str_chapter_index
'''
获取网站主页
'''
@@ -263,17 +272,34 @@ class comicInfo():
if not cls.str_comicName == None:
return os.path.join(pathStr.base_cbz, cls.str_comicName)
else:
print("comicName不存在,退出中")
print("comicName不存在,退出中 getDirCBZComic")
exit()
@classmethod
def getDirCBZComicChapter(cls):
if not cls.str_comicName == None and not cls.str_chapter == None:
if cls.str_comicName != None and cls.str_chapter != None:
return os.path.join(pathStr.base_cbz,cls.str_comicName,cls.str_chapter)
else:
print("comicName不存在,退出中")
print("comicName不存在,退出中 getDirCBZComicChapter")
exit()
@classmethod
def getSortDirCBZComicChapter(cls):
if cls.str_comicName != None and cls.str_chapter != None and cls.str_chapter_index != None:
return os.path.join(pathStr.base_cbz,cls.str_comicName,str(cls.str_chapter_index)+" "+cls.str_chapter)
else:
print("comicName不存在,退出中 getSortDirCBZComicChapter")
return None
@classmethod
def getNewCBZComicChapter(cls):
c_path = cls.getDirCBZComicChapter()
s_path = cls.getSortDirCBZComicChapter()
if os.path.exists(c_path) and s_path != None:
shutil.move(c_path, s_path)
print("文件已移动至:", s_path)
return s_path
@classmethod
def getDirComic(cls):
if cls.str_comicName != None: