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

use os_sorted over natsorted

This commit is contained in:
Alex Xu
2023-12-16 16:43:58 -08:00
parent 251df2e7ba
commit a99c63acea

View File

@@ -31,7 +31,7 @@ from tempfile import mkdtemp, gettempdir, TemporaryFile
from shutil import move, copytree, rmtree, copyfile from shutil import move, copytree, rmtree, copyfile
from multiprocessing import Pool from multiprocessing import Pool
from uuid import uuid4 from uuid import uuid4
from natsort import natsorted from natsort import os_sorted
from slugify import slugify as slugify_ext from slugify import slugify as slugify_ext
from PIL import Image from PIL import Image
from subprocess import STDOUT, PIPE from subprocess import STDOUT, PIPE
@@ -762,7 +762,7 @@ def getPanelViewSize(deviceres, size):
def sanitizeTree(filetree): def sanitizeTree(filetree):
chapterNames = {} chapterNames = {}
for root, dirs, files in os.walk(filetree, False): for root, dirs, files in os.walk(filetree, False):
for i, name in enumerate(natsorted(files)): for i, name in enumerate(os_sorted(files)):
splitname = os.path.splitext(name) splitname = os.path.splitext(name)
# file needs kcc at front AND back to avoid renaming issues # file needs kcc at front AND back to avoid renaming issues