Fix lazy audio path resolution for GPU streaming
Audio playback path was being resolved during parsing when database may not be ready, causing fallback to non-existent path. Now resolves lazily when stream starts, matching how audio analyzer works. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -244,6 +244,15 @@ async def update_cache_item_ipfs_cid(cid: str, ipfs_cid: str) -> bool:
|
||||
return result == "UPDATE 1"
|
||||
|
||||
|
||||
async def get_ipfs_cid(cid: str) -> Optional[str]:
|
||||
"""Get the IPFS CID for a cache item by its internal CID."""
|
||||
async with pool.acquire() as conn:
|
||||
return await conn.fetchval(
|
||||
"SELECT ipfs_cid FROM cache_items WHERE cid = $1",
|
||||
cid
|
||||
)
|
||||
|
||||
|
||||
async def delete_cache_item(cid: str) -> bool:
|
||||
"""Delete a cache item and all associated data (cascades)."""
|
||||
async with pool.acquire() as conn:
|
||||
|
||||
Reference in New Issue
Block a user