Fix media friendly names, metadata display, output recording, and plan display
- Add friendly name display to media detail and list pages - Unpack nested meta fields to top level for template access - Fix output_cid mismatch: use IPFS CID consistently between cache and database - Add dual-indexing in cache_manager to map both IPFS CID and local hash - Fix plan display: accept IPFS CIDs (Qm..., bafy...) not just 64-char hashes - Add friendly names to recipe listing - Add recipe upload button and handler to recipes list - Add debug logging to recipe listing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -412,6 +412,14 @@ class L1CacheManager:
|
||||
# Update content index (CID -> node_id mapping)
|
||||
self._set_content_index(cid, node_id)
|
||||
|
||||
# Also index by local hash if cid is an IPFS CID
|
||||
# This ensures both IPFS CID and local hash can be used to find the file
|
||||
if self._is_ipfs_cid(cid):
|
||||
local_hash = file_hash(source_path)
|
||||
if local_hash != cid:
|
||||
self._set_content_index(local_hash, node_id)
|
||||
logger.debug(f"Dual-indexed: {local_hash[:16]}... -> {node_id}")
|
||||
|
||||
logger.info(f"Cached: {cid[:16]}...")
|
||||
|
||||
return CachedFile.from_cache_entry(entry), cid
|
||||
|
||||
Reference in New Issue
Block a user