Commit da7a26df authored by dmMaze's avatar dmMaze
Browse files

fix #228

parent e4768d45
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ colorama
gallery-dl
openai
pyyaml
natsort
httpx[socks,brotli]
langdetect
pywin32; sys_platform == 'win32'
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ from pathlib import Path
import importlib
from typing import List, Dict, Callable
import re
from natsort import natsorted

IMG_EXT = ['.bmp', '.jpg', '.png', '.jpeg', '.webp']
NP_BOOL_TYPES = (np.bool_, np.bool8)
@@ -43,7 +44,7 @@ def find_all_imgs(img_dir, abs_path=False, sort=False):
            imglist.append(filename)

    if sort:
        imglist.sort(key=lambda f: int(re.sub('\D', '', f)))
        imglist = natsorted(imglist)
        
    return imglist