mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 22:10:14 -03:00
feat(metadata): add CivArchive API toggle and provider fallback order settings
- Add enable_civarchive_api toggle (default on) to allow disabling CivArchive to avoid its rate-limit windows entirely - Add metadata_provider_order dropdown with two presets: CivitAI → CivArchive → Archive DB (default) and CivitAI → Archive DB → CivArchive - Wire both settings through backend (metadata_service, settings_manager, misc_handlers) and frontend (SettingsManager, state, settings modal) - Reorder Metadata section in settings modal: toggles → status/management → fallback order, for natural top-down workflow - Make update_metadata_providers() log the effective provider chain using actually-registered providers rather than settings assumptions - Add 5 test cases covering all provider-combination paths - Complete i18n translations for 6 new keys across all 9 non-English locales
This commit is contained in:
@@ -2346,6 +2346,16 @@ export class SettingsManager {
|
||||
enableMetadataArchiveCheckbox.checked = state.global.settings.enable_metadata_archive_db || false;
|
||||
}
|
||||
|
||||
const enableCivarchiveApiCheckbox = document.getElementById('enableCivarchiveApi');
|
||||
if (enableCivarchiveApiCheckbox) {
|
||||
enableCivarchiveApiCheckbox.checked = state.global.settings.enable_civarchive_api ?? true;
|
||||
}
|
||||
|
||||
const metadataProviderOrderSelect = document.getElementById('metadataProviderOrder');
|
||||
if (metadataProviderOrderSelect) {
|
||||
metadataProviderOrderSelect.value = state.global.settings.metadata_provider_order || 'civitai_archive_sqlite';
|
||||
}
|
||||
|
||||
// Load status
|
||||
await this.updateMetadataArchiveStatus();
|
||||
} catch (error) {
|
||||
|
||||
@@ -13,6 +13,8 @@ const DEFAULT_SETTINGS_BASE = Object.freeze({
|
||||
language: 'en',
|
||||
show_only_sfw: false,
|
||||
enable_metadata_archive_db: false,
|
||||
enable_civarchive_api: true,
|
||||
metadata_provider_order: 'civitai_archive_sqlite',
|
||||
proxy_enabled: false,
|
||||
proxy_type: 'http',
|
||||
proxy_host: '',
|
||||
|
||||
Reference in New Issue
Block a user