Use preview if outline is not available

This commit is contained in:
SemvdH
2025-11-16 16:32:01 +01:00
parent 1f9f51396e
commit c815f754fe
2 changed files with 4 additions and 3 deletions

View File

@@ -24,13 +24,11 @@ def get_path_image(image_name, track: str, config: str = ""):
if image_name in lower and lower.endswith(".png"):
return os.path.join(img_path, name)
img_path = os.path.join(TRACKS_FOLDER, track, image_name)
img_path = os.path.join(TRACKS_FOLDER, track, config)
for name in os.listdir(img_path):
lower = name.lower()
if image_name in lower and lower.endswith(".png"):
return os.path.join(img_path, name)
return ""