mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-10-09 02:52:12 -03:00
feat(metadata): skip models on offline roots during bulk fetch (#1108)
Bulk metadata refresh picked candidates purely from cache state, so the entries the scoped scan deliberately keeps for unreachable drives were fetched anyway — burning CivitAI rate limit on sidecar/preview writes that cannot land. - Filter the fetch queue by root reachability (live check via describe_model_roots), covering both startup-offline and mid-session drive-off; probing failures degrade to no filtering - Report offline_skipped / offline_roots in the WS terminal payloads, the HTTP result and the completion message - Show a "Drive Offline" stat card in the fetch summary modal when any model was skipped this way
This commit is contained in:
@@ -898,7 +898,9 @@ export class BaseModelApiClient {
|
||||
}
|
||||
|
||||
_showFailureDetailsModal(data) {
|
||||
const { failures = [], success, processed, total, failure_count, skipped_count, elapsed_seconds } = data;
|
||||
const { failures = [], success, processed, total, failure_count, skipped_count, elapsed_seconds, offline_skipped = 0, offline_roots = [] } = data;
|
||||
|
||||
const offlineRootNames = offline_roots.map((root) => root.label || root.path || String(root)).join(', ');
|
||||
|
||||
// Build failure list HTML
|
||||
const failureRows = failures.map((f, i) =>
|
||||
@@ -935,6 +937,13 @@ export class BaseModelApiClient {
|
||||
<span class="stat-card-value">${skipped_count}</span>
|
||||
</div>
|
||||
</div>
|
||||
${offline_skipped > 0 ? `
|
||||
<div class="stat-card stat-card-offline" title="${this._escapeHtml(offlineRootNames)}">
|
||||
<div class="stat-card-body">
|
||||
<span class="stat-card-label">${translate('modals.metadataFetchSummary.statOffline', {}, 'Drive Offline')}</span>
|
||||
<span class="stat-card-value">${offline_skipped}</span>
|
||||
</div>
|
||||
</div>` : ''}
|
||||
<div class="stat-card stat-card-total">
|
||||
<div class="stat-card-body">
|
||||
<span class="stat-card-label">${translate('modals.metadataFetchSummary.statTotal', {}, 'Total Scanned')}</span>
|
||||
|
||||
Reference in New Issue
Block a user