1
0
mirror of https://github.com/ciromattia/kcc synced 2026-01-03 03:49:36 +00:00

Great Index: Slugification fix

This commit is contained in:
Paweł Jastrzębski
2014-01-24 09:08:39 +01:00
parent 3d8bcb4020
commit bd53c6108d
2 changed files with 30 additions and 13 deletions

View File

@@ -121,9 +121,7 @@ class ComicPage:
def saveToDir(self, targetdir, forcepng, color):
try:
flags = []
filename = os.path.join(targetdir, os.path.splitext(self.filename)[0])
if not filename.endswith('-KCC-A') and not filename.endswith('-KCC-B'):
filename += '-KCC'
filename = os.path.join(targetdir, os.path.splitext(self.filename)[0]) + '-KCC'
if not color and not forcepng:
self.image = self.image.convert('L')
if self.rotated:
@@ -282,8 +280,8 @@ class ComicPage:
leftbox = (0, 0, width, int(height / 2))
rightbox = (0, int(height / 2), width, height)
filename = os.path.splitext(self.filename)
fileone = targetdir + '/' + filename[0] + '-KCC-A' + filename[1]
filetwo = targetdir + '/' + filename[0] + '-KCC-B' + filename[1]
fileone = targetdir + '/' + filename[0] + '-A' + filename[1]
filetwo = targetdir + '/' + filename[0] + '-B' + filename[1]
try:
if righttoleft:
pageone = self.image.crop(rightbox)