Commit fd73bf1
committed
fix(komga): fix EPUB manifest metadata serialization breaking Komic TOC display
Rust's Decimal type serializes as a JSON string ("1") rather than a number (1),
which caused Readium's strict metadata parser to silently reject the entire
manifest in Komic, preventing the table of contents from displaying.
Key changes:
- Convert Decimal position to f64/i64 before JSON serialization to emit numbers
- Build absolute URLs using X-Forwarded-Proto/Host headers for reverse proxy support
- Add belongsTo (series info), language, modified, ISBN identifier to metadata
- Add /manifest route alias alongside /manifest/epub (Komga serves both)
- Add thumbnail entry to resources list
- Rewrite NCX parser with proper navPoint depth tracking via find_closing_nav_point
- Add NCX fallback discovery by well-known item IDs (toc, ncx, ncxtoc)
- Add EPUB 3 nav document parser for modern EPUBs
- Add tests for NCX parsing (flat, nested, real EPUB)1 parent d695990 commit fd73bf1
3 files changed
Lines changed: 363 additions & 78 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
0 commit comments