mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-06 08:26:45 -03:00
fix(civitai): support civitai.red URLs (#897)
This commit is contained in:
@@ -136,4 +136,14 @@ describe('DownloadManager version history badges', () => {
|
||||
expect(items[1].querySelector('.local-path')?.textContent).toContain('/models/still-local.safetensors');
|
||||
expect(items[1].querySelector('.downloaded-badge')).toBeNull();
|
||||
});
|
||||
|
||||
it('extracts model and version ids from civitai.red URLs', () => {
|
||||
const manager = new DownloadManager();
|
||||
|
||||
expect(
|
||||
manager.extractModelId('https://civitai.red/models/65423/nijimecha-artstyle?modelVersionId=777')
|
||||
).toBe('65423');
|
||||
expect(manager.modelVersionId).toBe('777');
|
||||
expect(manager.source).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user