properly sort images

pull/225/head
Aevann 2024-03-06 00:13:28 +02:00
parent 47531d8387
commit 08f2b7d0af
1 changed files with 2 additions and 1 deletions

View File

@ -459,6 +459,7 @@ def view_art(v):
urls = os.listdir(f'files/assets/images/{SITE_NAME}/{location_kind}')
urls = reversed([f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{location_kind}/{x}" for x in urls])
urls = sorted(urls, key=lambda x: int(x.split('.webp')[0]), reverse=True)
urls = [f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{location_kind}/{x}" for x in urls]
return render_template(f'view_art.html', v=v, urls=urls, title=title)