diff --git a/server.py b/server.py index fb10313..4a3d41d 100644 --- a/server.py +++ b/server.py @@ -1714,6 +1714,10 @@ async def cache_detail(content_hash: str, request: Request): elif file_size > 1024: size_str = f"{file_size/1024:.1f} KB" + # Get IPFS CID from database + cache_item = await database.get_cache_item(content_hash) + ipfs_cid = cache_item.get("ipfs_cid") if cache_item else None + # Build media display HTML if media_type == "video": video_src = video_src_for_request(content_hash, request) @@ -1770,7 +1774,47 @@ async def cache_detail(content_hash: str, request: Request): + ''' + # Add IPFS section if we have a CID + if ipfs_cid: + content += f''' +