mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 23:25:43 -03:00
Refactor metadata handling to use unified provider system
- Replaced direct usage of Civitai client with a fallback metadata provider across all recipe parsers. - Updated metadata service to improve initialization and error handling. - Enhanced download manager to utilize a downloader service for file operations. - Improved recipe scanner to fetch model information through the new metadata provider. - Updated utility functions to streamline image downloading and processing. - Added comprehensive logging and error handling for better debugging and reliability. - Introduced `get_default_metadata_provider()` for simplified access to the default provider. - Ensured backward compatibility with existing APIs and workflows.
This commit is contained in:
@@ -258,7 +258,7 @@ class UpdateRoutes:
|
||||
|
||||
try:
|
||||
downloader = await Downloader.get_instance()
|
||||
success, data = await downloader.make_request('GET', github_url, headers={'Accept': 'application/vnd.github+json'})
|
||||
success, data = await downloader.make_request('GET', github_url, custom_headers={'Accept': 'application/vnd.github+json'})
|
||||
|
||||
if not success:
|
||||
logger.warning(f"Failed to fetch GitHub commit: {data}")
|
||||
@@ -424,7 +424,7 @@ class UpdateRoutes:
|
||||
|
||||
try:
|
||||
downloader = await Downloader.get_instance()
|
||||
success, data = await downloader.make_request('GET', github_url, headers={'Accept': 'application/vnd.github+json'})
|
||||
success, data = await downloader.make_request('GET', github_url, custom_headers={'Accept': 'application/vnd.github+json'})
|
||||
|
||||
if not success:
|
||||
logger.warning(f"Failed to fetch GitHub release: {data}")
|
||||
|
||||
Reference in New Issue
Block a user