Enhance folder management in Lora API and UI; update folder tags dynamically and improve cache handling

This commit is contained in:
Will Miao
2025-02-14 13:58:12 +08:00
parent 451f77b99b
commit a32940bcf6
5 changed files with 53 additions and 12 deletions

View File

@@ -147,13 +147,17 @@ class ApiRoutes:
self._format_lora_response(item)
for item in result['items']
]
# Get all available folders from cache
cache = await self.scanner.get_cached_data()
return web.json_response({
'items': formatted_items,
'total': result['total'],
'page': result['page'],
'page_size': result['page_size'],
'total_pages': result['total_pages']
'total_pages': result['total_pages'],
'folders': cache.folders
})
except Exception as e: