Use .gl for Anna's Archive; add manual-import test

Replace default Anna's Archive base URL from https://annas-archive.li to https://annas-archive.gl across docs, UI components, API routes, processors, services, and tests. Add comprehensive tests for the admin manual-import API route and enhance the manual-import route to fetch missing ASIN details from Audnexus and create audiobook records with proper error handling and logging. Update related test expectations and FlareSolverr test usages to reflect the new default URL.
This commit is contained in:
kikootwo
2026-03-05 12:20:00 -05:00
parent 832a8ad00b
commit 09e1a0db3a
23 changed files with 338 additions and 48 deletions
+7 -7
View File
@@ -63,7 +63,7 @@ describe('E-book sidecar', () => {
},
});
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.li');
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.gl');
expect(result.success).toBe(true);
expect(result.responseTime).toBeTypeOf('number');
@@ -95,7 +95,7 @@ describe('E-book sidecar', () => {
},
});
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.li');
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.gl');
expect(result.success).toBe(false);
});
@@ -103,7 +103,7 @@ describe('E-book sidecar', () => {
it('returns error details when FlareSolverr request fails', async () => {
axiosMock.post.mockRejectedValue(new Error('flare down'));
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.li');
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.gl');
expect(result.success).toBe(false);
expect(result.message).toContain('flare down');
@@ -117,7 +117,7 @@ describe('E-book sidecar', () => {
},
});
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.li');
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.gl');
expect(result.success).toBe(false);
expect(result.message).toContain('FlareSolverr error');
@@ -132,7 +132,7 @@ describe('E-book sidecar', () => {
},
});
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.li');
const result = await testFlareSolverrConnection('http://flare', 'https://annas-archive.gl');
expect(result.success).toBe(false);
expect(result.message).toContain('FlareSolverr returned HTTP 403');
@@ -221,7 +221,7 @@ describe('E-book sidecar', () => {
throw new Error(`Unexpected URL: ${url}`);
});
const promise = downloadEbook('ASIN-NO', 'Title', 'Author', '/downloads', 'pdf', 'https://annas-archive.li', undefined, 'http://flare');
const promise = downloadEbook('ASIN-NO', 'Title', 'Author', '/downloads', 'pdf', 'https://annas-archive.gl', undefined, 'http://flare');
await vi.runAllTimersAsync();
const result = await promise;
@@ -417,7 +417,7 @@ describe('E-book sidecar', () => {
'Author',
'/downloads',
'epub',
'https://annas-archive.li',
'https://annas-archive.gl',
undefined,
'http://flare'
);