Skip to content

Books Library Documentation

Since: 0.17.0

The books library provides support for electronic book formats (EPUB, PDF, CBZ) with OPDS 1.2 feed generation for third-party client compatibility.

Supported Formats

FormatExtensionMetadata ExtractionNotes
EPUBepub✅ FullParses content.opf for title, author, publisher, ISBN, language, publication date, description
PDFpdf✅ BasicUses exif_read_data for XMP/EXIF metadata; page count extraction
CBZ (Comic Book Archive)cbz✅ FullParses ComicInfo.xml for series, volume, author; extracts cover image

OPDS Feed URL

The OPDS feed is available at /opds/v1.2. This follows the OPDS 1.2 specification and is compatible with:

  • Uboiquity (macOS/Windows/Linux)
  • Komga (self-hosted)
  • Kore (Android)
  • Moon+ Reader (Android)
  • Apple Books (iOS/macOS) — via third-party OPDS integration

OPDS Endpoints

Root Feed

GET /opds/v1.2

Returns the root OPDS catalog with links to libraries.

Libraries Navigation

GET /opds/v1.2/libraries

Returns a navigation feed listing all book libraries.

Library Acquisition Feed

GET /opds/v1.2/libraries/{library_id}?offset=0&limit=50

Returns an acquisition feed listing all books in a library with pagination support.

Web Portal Endpoints

EndpointMethodDescription
/booksGETList all books
/books/{id}GETGet book details
/books/{id}/coverGETGet cover image
/books/{id}/readGETOpen reader stub
/books/{id}/downloadGETDownload book file

Naming Conventions

Books should be named to facilitate metadata extraction:

EPUB

Author - Title.epub
Title (Year).epub

PDF

Author - Title.pdf
Title.pdf

CBZ (Comics)

Series Name v01.cbz
Series Name 2020 Issue #01.cbz

Metadata Fields Extracted

EPUB

FieldDescription
titleBook title from dc:title
authorCreator/author from dc:creator
publisherPublisher from dc:publisher
isbnISBN from dc:identifier
languageLanguage code from dc:language
pub_datePublication date from dc:date
descriptionDescription from dc:description
cover_pathPath to extracted cover image

PDF

FieldDescription
titleDocument title
authorDocument author
subjectDocument subject
keywordsDocument keywords
creatorCreator application
producerPDF producer
creation_dateCreation date
page_countNumber of pages

CBZ

FieldDescription
titleComic title
seriesSeries name
volumeVolume number
authorsWriter/artist names
page_countNumber of pages
cover_pageCover page index
cover_pathPath to extracted cover

Reader Stub

The built-in reader stub at /books/{id}/read provides:

  • Paginated HTML view (intentionally minimal)
  • Font size controls (A- / A+)
  • Theme switching (light / sepia / dark)
  • Keyboard navigation (← / →)

Note: Full EPUB rendering with text flow is planned for a future release. The current reader stub displays metadata and book information.

Third-Party OPDS Client Setup

  1. File → Add Catalog
  2. Enter OPDS feed URL: http://your-server:8080/opds/v1.2
  3. Browse and download books

Komga

  1. Add server with your Phlix URL
  2. Libraries are automatically discovered via OPDS

Moon+ Reader

  1. Menu → Online catalog
  2. Add custom catalog
  3. Enter OPDS feed URL

BSD-3-Clause