From 94fed6db51a60b72ec4baebd953a2fe0b24109b2 Mon Sep 17 00:00:00 2001 From: Timothy Farrell Date: Tue, 17 Mar 2026 21:34:07 -0500 Subject: [PATCH] Add a pause button --- main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 278e9b3..88e9f0c 100644 --- a/main.py +++ b/main.py @@ -215,7 +215,7 @@ async def hash_page(file_hash: str): raise HTTPException(status_code=404, detail="File not found") navigation_data = _get_navigation_data(file_hash) - play_button = ''.format( + play_button = ''.format( file_hash=file_hash ) return _render_page(navigation_data, play_button=play_button) @@ -244,7 +244,12 @@ async def hash_page_with_refresh(order: str, delay: int, file_hash: str): refresh_meta = f'' image_click_url = "/{file_hash}".format(file_hash=file_hash) - return _render_page(navigation_data, refresh_meta, image_click_url) + # Create pause button to stop auto-refresh + pause_button = ''.format( + file_hash=file_hash + ) + + return _render_page(navigation_data, refresh_meta, image_click_url, play_button=pause_button) def _find_indexer_for_hash(file_hash: str):