tone3000 metadata capture: save .meta.json alongside downloaded models

- UI now sends full Tone3000 metadata on install (id, author,
  architecture, pack_name, description, thumbnail, etc.)
- Search results show size, architecture, and pack name
- Install endpoint saves a .meta.json file next to each .nam with:
  author, architecture, description, pack, thumbnail, download date
- Enables offline browsing of model provenance
This commit is contained in:
2026-06-16 19:49:23 -04:00
parent a37e381c4e
commit 5cdc751312
2 changed files with 21 additions and 2 deletions
+19
View File
@@ -1950,6 +1950,25 @@ class WebServer:
path = await client.download_model(model)
if not path:
raise HTTPException(status_code=500, detail="Download failed")
# Save metadata alongside the model file
import json
meta = {
"id": data.get("id"),
"name": data.get("name"),
"filename": data.get("filename"),
"size_bytes": data.get("size"),
"author": data.get("author"),
"author_avatar": data.get("author_avatar"),
"thumbnail": data.get("thumbnail"),
"tone_description": data.get("tone_description"),
"pack_name": data.get("pack_name"),
"architecture": data.get("architecture"),
"created_at": data.get("created_at"),
"download_date": datetime.datetime.now().isoformat(),
"source": "tone3000",
}
meta_path = path.with_suffix(".meta.json")
meta_path.write_text(json.dumps(meta, indent=2))
# Refresh the model list via NAM host
nam = self.deps.nam_host
if nam: