From 4eb9ff1188861ec281e458c05fb31d4078153574 Mon Sep 17 00:00:00 2001 From: Timothy Farrell Date: Thu, 12 Mar 2026 08:59:07 +0000 Subject: [PATCH] Add an easier way to access order/delay --- main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.py b/main.py index 81855c6..0a47794 100644 --- a/main.py +++ b/main.py @@ -158,6 +158,15 @@ async def root(): return RedirectResponse(url="/{hash}".format(hash=random_hash)) +@app.get("/{order}/{delay}") +async def order_delay(order: str, delay: int): + """Redirect to random file with order and delay""" + random_hash = _get_random_hash() + return RedirectResponse( + url="/{order}/{delay}/{hash}".format(order=order, delay=delay, hash=random_hash) + ) + + def _get_navigation_data(file_hash: str): """Get navigation data for a file hash""" keys = list(file_mapping.keys())