Add a pause button

This commit is contained in:
Timothy Farrell 2026-03-17 21:34:07 -05:00
parent 78fd988583
commit 94fed6db51

View File

@ -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 = '<a href="/next/5/{file_hash}" class="play-btn" title="Play next 5"></a>'.format(
play_button = '<a href="/next/5/{file_hash}" class="play-btn" title="Play next 5"></a>'.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'<meta http-equiv="refresh" content="{delay};url={refresh_url}">'
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 = '<a href="/{file_hash}" class="play-btn" title="Pause">⏸</a>'.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):