mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
feat: enhance model move functionality with cache entry updates
- Return cache entry data from model move operations for immediate UI updates - Add recalculate_type parameter to update_single_model_cache for proper type adjustment - Propagate cache entry through API layer to frontend MoveManager - Enable virtual scroller to update moved items with new cache data
This commit is contained in:
@@ -496,12 +496,15 @@ class ModelMoveService:
|
||||
'new_file_path': file_path
|
||||
}
|
||||
|
||||
new_file_path = await self.scanner.move_model(file_path, target_path)
|
||||
if new_file_path:
|
||||
move_result = await self.scanner.move_model(file_path, target_path)
|
||||
if move_result:
|
||||
new_file_path = move_result.get("new_path")
|
||||
cache_entry = move_result.get("cache_entry")
|
||||
return {
|
||||
'success': True,
|
||||
'original_file_path': file_path,
|
||||
'new_file_path': new_file_path
|
||||
'new_file_path': new_file_path,
|
||||
'cache_entry': cache_entry
|
||||
}
|
||||
else:
|
||||
return {
|
||||
@@ -539,7 +542,8 @@ class ModelMoveService:
|
||||
"original_file_path": file_path,
|
||||
"new_file_path": result.get('new_file_path'),
|
||||
"success": result['success'],
|
||||
"message": result.get('message', result.get('error', 'Unknown'))
|
||||
"message": result.get('message', result.get('error', 'Unknown')),
|
||||
"cache_entry": result.get('cache_entry')
|
||||
})
|
||||
|
||||
success_count = sum(1 for r in results if r["success"])
|
||||
|
||||
Reference in New Issue
Block a user