Commit Graph
2 Commits
Author SHA1 Message Date
john-okeefe 76648e1a54 docs: add comprehensive comic metadata implementation plan
Add detailed implementation plan for comic and manga metadata support including
reading direction detection, smart Calibre + ComicInfo.xml merging, and universal
metadata fields that apply to all media formats.

Implementation Plan (IMPLEMENTATION_PLAN_MERGE_METADATA_READING_DIRECTION.md):
- 10 phases covering database, data structures, merging logic, API, testing, and documentation
- Phase 1: Database schema (14 new columns, 8 indexes)
- Phase 2: Data structure updates (ComicInfo 18→29 fields, MediaMetadata +15 fields)
- Phase 3: Smart metadata merging (mergeMetadata, 8 helper functions)
- Phase 4: Media item creation (database integration)
- Phase 5: API layer updates (TypeScript types, Go handlers)
- Phase 6-10: Testing, Bruno tests, docs, build, commits
- Genre/tag processing strategy (Option A: reuse existing genre column)
- 5 universal fields apply to all formats: age_rating, series_count, volume, imprint, web_url
- Reading direction: manga_type (raw) + reading_direction (computed)

Key Design Decisions:
- Smart merging: metadata.opf priority + ComicInfo.xml fills gaps
- Genre processing: All <dc:subject> and comic genre tags go to tags array
- Reading direction computed from Manga field + language + genre heuristics
- Supports manga (RTL), webtoons/manhwa (vertical), Western comics (LTR)
- JSONB for alternate_info (flexible schema for alternate series data)

Documentation Deleted:
- BOOK_DETAIL_IMPLEMENTATION.md (superseded by new comprehensive plan)

Plan Status:
- Phases 1-5: COMPLETE
- Phases 6-10: Pending (testing, bruno tests, documentation, build, git commits)

Total: 1,970 lines of detailed implementation guidance with code examples.
2026-03-29 19:12:10 -04:00
john-okeefe 1b632a1b6e docs: add implementation plan for comprehensive comic metadata support
This document provides a complete implementation plan for extracting ALL 19
ComicInfo.xml v2.0 fields with smart metadata merging and universal metadata
support across all media types (ebooks, audiobooks, comics).

Key features planned:
- Complete ComicInfo.xml v2.0 support (all 19 fields)
- Smart metadata merging: Calibre metadata.opf + ComicInfo.xml + folder structure
- Universal metadata fields (5 fields apply to ALL formats):
  * age_rating: Content classification (Everyone, Teen, Mature, Adult)
  * series_count: Total items in series
  * volume: Collected edition/omnibus number
  * imprint: Publisher subdivision
  * web_url: Info page URLs (Goodreads, Audible, ComicVine, etc.)
- Comic-specific fields (10 fields):
  * manga_type, reading_direction: Reading direction detection
  * story_arc, scan_information, alternate_info, summary, etc.
- Genre/tag processing: ALL genres appear in tags array without duplication
  * Uses existing 'genre' column for primary genre
  * processGenresAndTags() ensures no duplicate genres in tags
  * Works for EPUB, ComicInfo.xml, PDF metadata
- 15 new database columns, 8 indexes
- Full-stack support: database → Go → API → TypeScript → frontend
- Comprehensive testing and documentation

Plan organization:
- 10 phases: Database schema → Data structures → Smart merging → API updates
- Includes detailed commit strategy with sequential git add/commit/push commands
- Testing checklist with manual verification steps
- Bruno API test specifications
- Documentation updates (user + API reference)

This plan follows PROJECT_GUIDELINES.md requirements:
- No new services or handlers (reuses existing media_scanner.go)
- Uses setupTestServer() helper for integration tests
- Includes Bruno YAML files for API testing
- Sequential git commits with detailed messages
- Reuses existing code patterns and database schema
2026-03-29 12:05:06 -04:00