Sort image list alphabetically
This commit is contained in:
@@ -48,7 +48,9 @@ def get_image_list(folder_name: str) -> list:
|
||||
}
|
||||
img_list.append(img_dict)
|
||||
|
||||
return img_list
|
||||
# Sort images alphabetically by filename (case-insensitive) to ensure consistent ordering.
|
||||
# Directory listings may return files in different orders.
|
||||
return sorted(img_list, key=lambda x: x["title"].lower())
|
||||
|
||||
|
||||
def get_folder_list():
|
||||
|
||||
Reference in New Issue
Block a user