Update cbzhelper.py

This commit is contained in:
hyugogirubato
2022-08-30 14:56:48 +02:00
committed by GitHub
parent 433578fc9b
commit 231d24912f
+4 -2
View File
@@ -140,7 +140,9 @@ class Helper:
f.write(content)
properties = Image.open(page)
if page_type == 'DEFAULT':
if page_type == 'DEFAULT' or not page_type in ['FrontCover', 'InnerCover', 'Roundup', 'Story',
'Advertisment', 'Editorial', 'Letters', 'Preview',
'BackCover', 'Other', 'Deleted']:
page_type = 'FrontCover' if image == 1 else 'Story'
self.pages.append({
@@ -160,4 +162,4 @@ class Helper:
with open(os.path.join(self.tmp, file), mode='rb') as f:
cbz.writestr(file, data=f.read())
cbz.close()
shutil.rmtree(self.tmp)
shutil.rmtree(self.tmp)