mirror of
https://github.com/ciromattia/kcc
synced 2026-07-31 09:01:35 +00:00
pass options to slugify (#1411)
This commit is contained in:
@@ -1254,7 +1254,7 @@ def sanitizeTree(filetree, prefix='kcc'):
|
|||||||
dirs.sort(key=OS_SORT_KEY)
|
dirs.sort(key=OS_SORT_KEY)
|
||||||
for i, name in enumerate(dirs):
|
for i, name in enumerate(dirs):
|
||||||
tmpName = name
|
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():
|
while os.path.exists(os.path.join(root, slugified)) and name.upper() != slugified.upper():
|
||||||
slugified += "A"
|
slugified += "A"
|
||||||
chapterNames[slugified] = tmpName
|
chapterNames[slugified] = tmpName
|
||||||
@@ -1417,7 +1417,7 @@ def createNewTome(parent):
|
|||||||
return tomePath, tomePathRoot
|
return tomePath, tomePathRoot
|
||||||
|
|
||||||
|
|
||||||
def slugify(value, is_natural_sorted):
|
def slugify(value, options, is_natural_sorted):
|
||||||
if options.format == 'CBZ' and is_natural_sorted:
|
if options.format == 'CBZ' and is_natural_sorted:
|
||||||
return value
|
return value
|
||||||
if options.format != 'CBZ':
|
if options.format != 'CBZ':
|
||||||
|
|||||||
Reference in New Issue
Block a user