mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 04:40:09 +00:00
Add interactive ebook search & selection
Introduce interactive ebook support: adds two API endpoints to search (interactive-search-ebook) and create/select ebook requests (select-ebook), plus server-side handlers to route Anna's Archive (direct) and indexer (torrent/NZB) downloads. Frontend: extend RequestActionsDropdown and InteractiveTorrentSearchModal to support an "ebook" search mode and selection flow, and add hooks (useInteractiveSearchEbook / useSelectEbook). Settings: add ebook_auto_grab_enabled with UI toggle and enforce disabling when no ebook sources are enabled; settings GET/PUT updated to persist the flag (default = true to preserve behavior). Documentation updated (scheduler, ebook-sidecar, settings pages) and ranking algorithm docs/tests extended to cover ebook-related normalization and matching cases. Includes logging and ranking integration for indexer results and normalization for Anna's Archive handling.
This commit is contained in:
@@ -785,8 +785,16 @@ async function createEbookRequestIfEnabled(
|
||||
logger: RMABLogger
|
||||
): Promise<void> {
|
||||
try {
|
||||
// Check which ebook sources are enabled
|
||||
const configService = getConfigService();
|
||||
|
||||
// Check if auto-grab is enabled (default: true for backward compatibility)
|
||||
const autoGrabEnabled = await configService.get('ebook_auto_grab_enabled');
|
||||
if (autoGrabEnabled === 'false') {
|
||||
logger.info('Ebook auto-grab disabled, skipping automatic ebook request creation');
|
||||
return;
|
||||
}
|
||||
|
||||
// Check which ebook sources are enabled
|
||||
const annasArchiveEnabled = await configService.get('ebook_annas_archive_enabled');
|
||||
const indexerSearchEnabled = await configService.get('ebook_indexer_search_enabled');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user