1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

Do not slugify folder names when output format is CBZ (fixes #914) (#920)

This commit is contained in:
orpheus1120
2025-06-05 04:38:17 +08:00
committed by GitHub
parent 51d0be4379
commit c7e69f5bdb

View File

@@ -986,6 +986,8 @@ def createNewTome(parent):
def slugify(value):
if options.format == 'CBZ':
return value
value = slugify_ext(value, regex_pattern=r'[^-a-z0-9_\.]+').strip('.')
value = sub(r'0*([0-9]{4,})', r'\1', sub(r'([0-9]+)', r'0000\1', value, count=2))
return value