Add inline model name editing with validation and resortable cache

This commit is contained in:
Will Miao
2025-03-07 10:32:27 +08:00
parent a9b3131e64
commit 69b1773ced
4 changed files with 172 additions and 7 deletions

View File

@@ -609,6 +609,11 @@ class ApiRoutes:
# Update cache
await self.scanner.update_single_lora_cache(file_path, file_path, metadata)
# If model_name was updated, resort the cache
if 'model_name' in metadata_updates:
cache = await self.scanner.get_cached_data()
await cache.resort(name_only=True)
return web.json_response({'success': True})
except Exception as e: