feat: Revamp EPUB import process with batch upload support and enhanced API integration
Build and Push Reader Image / docker (push) Failing after 22s

- Introduced a new batch import client for handling multiple EPUB files simultaneously.
- Updated API routes for previewing and importing EPUB files, improving error handling and response management.
- Enhanced genre management during import, allowing for dynamic creation and association of genres.
- Implemented long-fetch handling to accommodate lengthy processing times for large EPUB files.
- Refined UI components for better user experience in the import workflow.
This commit is contained in:
2026-05-11 15:27:13 +07:00
parent 3cc0ea1b9f
commit 669addf799
20 changed files with 605 additions and 112 deletions
+6 -6
View File
@@ -42,9 +42,9 @@ Luon xem `reader-api` la canonical behavior.
## Flow 5: MOD EPUB Import Wizard
- Route: `/mod/import`
- Steps:
1. Search source asset by name (`GET /api/import/assets/search`)
2. Review metadata + AI suggestion (`preview-metadata`, `ai-suggest`, `review`)
3. Parse preview with TOC/regex-start (`POST /api/import/assets/{id}/parse-preview`)
4. Start import and poll progress (`start-import`, `GET /api/import/sessions/{sessionId}`)
- Rule: reviewer confirms metadata before import starts.
- Steps (khớp `app/mod/import/import-client.tsx`):
1. Chọn thể loại / tạo thể loại qua `/api/mod/the-loai`.
2. Upload EPUB để preview: `POST /api/import/uploads/preview` (multipart).
3. Gợi ý metadata (tuỳ bước): `POST /api/mod/epub/ai-suggest`.
4. Import/xử lý EPUB: `POST /api/mod/epub` (multipart; có luồng preview và apply).