mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
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:
@@ -63,7 +63,7 @@ describe('processStartDirectDownload', () => {
|
||||
vi.clearAllMocks();
|
||||
configServiceMock.get.mockImplementation(async (key: string) => {
|
||||
if (key === 'downloads_dir') return '/downloads';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.li';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.gl';
|
||||
if (key === 'ebook_sidecar_preferred_format') return 'epub';
|
||||
return null;
|
||||
});
|
||||
@@ -238,7 +238,7 @@ describe('processStartDirectDownload', () => {
|
||||
|
||||
configServiceMock.get.mockImplementation(async (key: string) => {
|
||||
if (key === 'downloads_dir') return '/downloads';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.li';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.gl';
|
||||
if (key === 'ebook_sidecar_preferred_format') return 'epub';
|
||||
if (key === 'ebook_sidecar_flaresolverr_url') return 'http://flaresolverr:8191';
|
||||
return null;
|
||||
@@ -286,7 +286,7 @@ describe('processStartDirectDownload', () => {
|
||||
|
||||
expect(ebookScraperMock.extractDownloadUrl).toHaveBeenCalledWith(
|
||||
'https://slow.example.com/book',
|
||||
'https://annas-archive.li',
|
||||
'https://annas-archive.gl',
|
||||
'epub',
|
||||
expect.anything(),
|
||||
'http://flaresolverr:8191'
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('processSearchEbook', () => {
|
||||
configServiceMock.getAudibleRegion.mockResolvedValue('us');
|
||||
configServiceMock.get.mockImplementation(async (key: string) => {
|
||||
if (key === 'ebook_sidecar_preferred_format') return 'epub';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.li';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.gl';
|
||||
if (key === 'ebook_annas_archive_enabled') return 'true';
|
||||
if (key === 'ebook_indexer_search_enabled') return 'false';
|
||||
return null;
|
||||
@@ -79,7 +79,7 @@ describe('processSearchEbook', () => {
|
||||
expect(ebookScraperMock.searchByAsin).toHaveBeenCalledWith(
|
||||
'B001ASIN',
|
||||
'epub',
|
||||
'https://annas-archive.li',
|
||||
'https://annas-archive.gl',
|
||||
expect.anything(),
|
||||
undefined,
|
||||
'en'
|
||||
@@ -124,7 +124,7 @@ describe('processSearchEbook', () => {
|
||||
'Another Book',
|
||||
'Another Author',
|
||||
'epub',
|
||||
'https://annas-archive.li',
|
||||
'https://annas-archive.gl',
|
||||
expect.anything(),
|
||||
undefined,
|
||||
'en'
|
||||
@@ -229,7 +229,7 @@ describe('processSearchEbook', () => {
|
||||
|
||||
configServiceMock.get.mockImplementation(async (key: string) => {
|
||||
if (key === 'ebook_sidecar_preferred_format') return 'epub';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.li';
|
||||
if (key === 'ebook_sidecar_base_url') return 'https://annas-archive.gl';
|
||||
if (key === 'ebook_sidecar_flaresolverr_url') return 'http://flaresolverr:8191';
|
||||
if (key === 'ebook_annas_archive_enabled') return 'true';
|
||||
if (key === 'ebook_indexer_search_enabled') return 'false';
|
||||
@@ -255,7 +255,7 @@ describe('processSearchEbook', () => {
|
||||
expect(ebookScraperMock.searchByAsin).toHaveBeenCalledWith(
|
||||
'B006ASIN',
|
||||
'epub',
|
||||
'https://annas-archive.li',
|
||||
'https://annas-archive.gl',
|
||||
expect.anything(),
|
||||
'http://flaresolverr:8191',
|
||||
'en'
|
||||
|
||||
Reference in New Issue
Block a user