fix(download): recognize civitai.red and civitai.green URLs in batch download (#1003)

This commit is contained in:
Will Miao
2026-07-02 10:28:03 +08:00
parent fe90f7f9b1
commit d7291f73c9
2 changed files with 16 additions and 2 deletions

View File

@@ -62,6 +62,20 @@ describe('DownloadManager.detectUrlType — HF URL detection', () => {
expect(result).toEqual({ type: 'civitai' });
});
it('detects CivitAI URL on civitai.red domain', () => {
const result = DownloadManager.detectUrlType(
'https://civitai.red/models/12345/my-model'
);
expect(result).toEqual({ type: 'civitai' });
});
it('detects CivitAI URL on civitai.green domain', () => {
const result = DownloadManager.detectUrlType(
'https://civitai.green/models/67890/another-model'
);
expect(result).toEqual({ type: 'civitai' });
});
it('detects CivArchive URL', () => {
const result = DownloadManager.detectUrlType(
'https://civarchive.com/models/456'