1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-31 00:51:40 +00:00

pass options to slugify (#1411)

This commit is contained in:
Alex Xu
2026-07-29 17:06:52 -07:00
committed by GitHub
parent 7e412f12ae
commit b4c71b3b91
+2 -2
View File
@@ -1254,7 +1254,7 @@ def sanitizeTree(filetree, prefix='kcc'):
dirs.sort(key=OS_SORT_KEY)
for i, name in enumerate(dirs):
tmpName = name
slugified = slugify(name, is_natural_sorted)
slugified = slugify(name, options, is_natural_sorted)
while os.path.exists(os.path.join(root, slugified)) and name.upper() != slugified.upper():
slugified += "A"
chapterNames[slugified] = tmpName
@@ -1417,7 +1417,7 @@ def createNewTome(parent):
return tomePath, tomePathRoot
def slugify(value, is_natural_sorted):
def slugify(value, options, is_natural_sorted):
if options.format == 'CBZ' and is_natural_sorted:
return value
if options.format != 'CBZ':