mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-07 22:40:14 -03:00
feat(downloads): default to latest version when URL lacks modelVersionId
Auto-select the first (newest) version for URLs without an explicit modelVersionId, matching the existing batch flow, so users can proceed to location/download without manually picking a version.
This commit is contained in:
@@ -235,6 +235,9 @@ export class DownloadManager {
|
||||
|
||||
if (this.modelVersionId) {
|
||||
this.currentVersion = this.versions.find(v => v.id.toString() === this.modelVersionId);
|
||||
} else {
|
||||
// No explicit version id in the URL → default to the latest version (Civitai returns newest first)
|
||||
this.currentVersion = this.versions[0];
|
||||
}
|
||||
|
||||
this.showVersionStep();
|
||||
@@ -428,6 +431,9 @@ export class DownloadManager {
|
||||
await this.retrieveVersionsForModel(this.modelId, this.source);
|
||||
if (this.modelVersionId) {
|
||||
this.currentVersion = this.versions.find(v => v.id.toString() === this.modelVersionId);
|
||||
} else {
|
||||
// No explicit version id → default to the latest version (Civitai returns newest first)
|
||||
this.currentVersion = this.versions[0];
|
||||
}
|
||||
this.showVersionStep();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user