Implement chapter merging feature and update ranking algorithm

Added automatic chapter merging to M4B with admin/config toggles, UI controls, and backend logic. Updated documentation to reflect implementation. Refactored ranking algorithm: increased Title/Author match points, removed size scoring, and improved Usenet/torrent handling. Enhanced Prowlarr integration for protocol detection and filtering. Improved file organizer to support chapter merging. Various bug fixes and logging improvements.
This commit is contained in:
kikootwo
2026-01-08 16:26:26 -05:00
parent 722a78ac33
commit 288421012d
21 changed files with 922 additions and 128 deletions
+12
View File
@@ -412,6 +412,18 @@ export async function POST(request: NextRequest) {
},
});
// Chapter merging configuration
await prisma.configuration.upsert({
where: { key: 'chapter_merging_enabled' },
update: { value: String(paths.chapter_merging_enabled ?? false) },
create: {
key: 'chapter_merging_enabled',
value: String(paths.chapter_merging_enabled ?? false),
category: 'automation',
description: 'Automatically merge multi-file chapter downloads into single M4B with chapter markers'
},
});
// BookDate configuration (optional, global for all users)
// Note: libraryScope and customPrompt are now per-user settings, not required here
if (bookdate && bookdate.provider && bookdate.apiKey && bookdate.model) {