feat(metadata): rebuild book auto-fetch as library scopes with counts

Show the global rule and each library's own rule on Field Rules-style tabs, with live counts per
condition, the score histogram and the books a run would take. Store only what a library changes,
run every library with its own rule, and record each library's run. Also fix the DjVu queue test
that assumed which request waits, and inventory the DjVu reader routes.
This commit is contained in:
neon
2026-10-16 19:05:32 +00:00
parent c378354dac
commit 7d823039b0
46 changed files with 2660 additions and 1626 deletions
@@ -1,8 +1,8 @@
{
"totalRoutes": 654,
"totalRoutes": 660,
"byPermission": {
"(none)": 283,
"Permission.ManageMetadataConfig": 38,
"(none)": 286,
"Permission.ManageMetadataConfig": 41,
"Permission.EmailSend": 34,
"Permission.LibraryEditMetadata": 35,
"Permission.BookDockAccess": 17,
@@ -503,6 +503,18 @@
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/book-metadata-fetch/book-metadata-fetch.controller.ts",
"className": "BookMetadataFetchController",
"methodName": "listLibraryConfigs",
"httpMethod": "GET",
"path": "/book-metadata-fetch/config/libraries",
"permissions": ["Permission.ManageMetadataConfig"],
"libraryAccess": [],
"isPublic": false,
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/book-metadata-fetch/book-metadata-fetch.controller.ts",
"className": "BookMetadataFetchController",
@@ -635,6 +647,30 @@
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/book-metadata-fetch/book-metadata-fetch.controller.ts",
"className": "BookMetadataFetchController",
"methodName": "previewBreakdown",
"httpMethod": "POST",
"path": "/book-metadata-fetch/preview-breakdown",
"permissions": ["Permission.ManageMetadataConfig"],
"libraryAccess": [],
"isPublic": false,
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/book-metadata-fetch/book-metadata-fetch.controller.ts",
"className": "BookMetadataFetchController",
"methodName": "previewBooks",
"httpMethod": "POST",
"path": "/book-metadata-fetch/preview-books",
"permissions": ["Permission.ManageMetadataConfig"],
"libraryAccess": [],
"isPublic": false,
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/book-metadata-fetch/book-metadata-fetch.controller.ts",
"className": "BookMetadataFetchController",
@@ -994,5 +994,41 @@
"isPublic": true,
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/reader/djvu/djvu.controller.ts",
"className": "DjvuController",
"methodName": "getPageCount",
"httpMethod": "GET",
"path": "/djvu/files/:fileId/pages",
"permissions": [],
"libraryAccess": [],
"isPublic": false,
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/reader/djvu/djvu.controller.ts",
"className": "DjvuController",
"methodName": "getPage",
"httpMethod": "GET",
"path": "/djvu/files/:fileId/pages/:pageIndex",
"permissions": [],
"libraryAccess": [],
"isPublic": false,
"allowDefault": false,
"useGuards": []
},
{
"file": "server/src/modules/reader/djvu/djvu.controller.ts",
"className": "DjvuController",
"methodName": "getPageText",
"httpMethod": "GET",
"path": "/djvu/files/:fileId/pages/:pageIndex/text",
"permissions": [],
"libraryAccess": [],
"isPublic": false,
"allowDefault": false,
"useGuards": []
}
]