diff --git a/server.py b/server.py index 350d0ee..74ff53c 100644 --- a/server.py +++ b/server.py @@ -1426,7 +1426,8 @@ async def ui_runs(request: Request):
''') if input_media_type == "video": - html_parts.append(f'') + input_video_src = video_src_for_request(input_hash, request) + html_parts.append(f'') elif input_media_type == "image": html_parts.append(f'input') html_parts.append('
') @@ -1441,7 +1442,8 @@ async def ui_runs(request: Request):
''') if output_media_type == "video": - html_parts.append(f'') + output_video_src = video_src_for_request(output_hash, request) + html_parts.append(f'') elif output_media_type == "image": html_parts.append(f'output') html_parts.append('
') @@ -1551,7 +1553,8 @@ async def ui_cache_list( ''') if media_type == "video": - html_parts.append(f'') + video_src = video_src_for_request(content_hash, request) + html_parts.append(f'') elif media_type == "image": html_parts.append(f'{content_hash[:16]}') else: @@ -1871,7 +1874,7 @@ async def ui_detail_page(run_id: str, request: Request): @app.get("/ui/run/{run_id}", response_class=HTMLResponse) -async def ui_run_partial(run_id: str): +async def ui_run_partial(run_id: str, request: Request): """HTMX partial: single run (for polling updates).""" run = load_run(run_id) if not run: @@ -1942,7 +1945,8 @@ async def ui_run_partial(run_id: str):
''' if input_media_type == "video": - html += f'' + input_video_src = video_src_for_request(input_hash, request) + html += f'' elif input_media_type == "image": html += f'input' html += '
' @@ -1956,7 +1960,8 @@ async def ui_run_partial(run_id: str):
''' if output_media_type == "video": - html += f'' + output_video_src = video_src_for_request(output_hash, request) + html += f'' elif output_media_type == "image": html += f'output' html += '
'