mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2024-12-29 10:56:10 +00:00
Opimising EVERYTHING
This commit is contained in:
parent
6729142d1b
commit
e144407b0e
|
@ -81,9 +81,13 @@ def image(image_id):
|
|||
# Slice the list of IDs into chunks of the limit
|
||||
for j in total_images[i * limit : (i + 1) * limit]:
|
||||
# Is our image in this chunk?
|
||||
if image_id in j:
|
||||
if image_id > j[-1]:
|
||||
continue
|
||||
else:
|
||||
return_page = i + 1
|
||||
break
|
||||
# Techically we dont need to go further since the image
|
||||
# Is somewhere on this page
|
||||
|
||||
return render_template(
|
||||
"image.html",
|
||||
|
|
Loading…
Reference in a new issue