feat(library): add FB2 file metadata writing and library settings

Add server support for writing metadata, embedded covers, and FictionBook XML structures directly into FB2 format files. Introduce migration 0058 to persist FB2 file write preferences per library, and update library creator UI and locale catalogs.
This commit is contained in:
neon
2026-07-28 06:50:37 +00:00
parent f7716bdbdb
commit d0047bbf18
54 changed files with 19055 additions and 111 deletions
+10
View File
@@ -109,6 +109,15 @@ export const EPUB_BOOK_FILE_WRITE_FIELDS = [
"coverBytes",
] as const satisfies readonly BookFileWriteField[];
// FB2 keeps managed metadata in <description>: standard slots cover the core
// fields, and <custom-info info-type="bookorbit:*"> carries the rest.
export const FB2_BOOK_FILE_WRITE_FIELDS = [
...CORE_BOOK_FILE_WRITE_FIELDS,
...COMMON_PROVIDER_BOOK_FILE_WRITE_FIELDS,
"itunesId",
"coverBytes",
] as const satisfies readonly BookFileWriteField[];
export const PDF_BOOK_FILE_WRITE_FIELDS = [
...CORE_BOOK_FILE_WRITE_FIELDS,
...COMMON_PROVIDER_BOOK_FILE_WRITE_FIELDS,
@@ -158,6 +167,7 @@ export const AUDIO_BOOK_FILE_WRITE_FIELDS = [
export const BOOK_FILE_WRITE_FORMAT_FIELDS = {
epub: EPUB_BOOK_FILE_WRITE_FIELDS,
fb2: FB2_BOOK_FILE_WRITE_FIELDS,
pdf: PDF_BOOK_FILE_WRITE_FIELDS,
cbz: CBX_BOOK_FILE_WRITE_FIELDS,
cb7: CBX_BOOK_FILE_WRITE_FIELDS,
+2
View File
@@ -70,6 +70,8 @@ export interface Library {
fileWriteWriteCover: boolean;
fileWriteEpubEnabled: boolean;
fileWriteEpubMaxFileSizeMb: number;
fileWriteFb2Enabled: boolean;
fileWriteFb2MaxFileSizeMb: number;
fileWritePdfEnabled: boolean;
fileWritePdfMaxFileSizeMb: number;
fileWriteCbxEnabled: boolean;