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:
gilesb
2026-01-12 14:21:39 +00:00
parent 19634a4ac5
commit ee8719ac0b
9 changed files with 183 additions and 11 deletions

View File

@@ -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