diff --git a/src/web/server.py b/src/web/server.py index ccc65a0..94bf547 100644 --- a/src/web/server.py +++ b/src/web/server.py @@ -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: diff --git a/src/web/ui-v2-dist/index.html b/src/web/ui-v2-dist/index.html index 9d3d2bb..c0d90fc 100644 --- a/src/web/ui-v2-dist/index.html +++ b/src/web/ui-v2-dist/index.html @@ -1021,10 +1021,10 @@ function init(){ const d=document.createElement('div'); d.className='preset-card'; d.style.cursor='default'; - d.innerHTML='