Skip to content

Show Calibre pages count in book detail view#3600

Closed
jarynclouatre wants to merge 1 commit intojaneczku:masterfrom
jarynclouatre:feature/show-pages-count
Closed

Show Calibre pages count in book detail view#3600
jarynclouatre wants to merge 1 commit intojaneczku:masterfrom
jarynclouatre:feature/show-pages-count

Conversation

@jarynclouatre
Copy link
Copy Markdown
Contributor

Closes #3568

Calibre added a native pages column stored in the books_pages_link table. This PR surfaces that data in the book detail view.

Changes:

  • Added BooksPages ORM model in cps/db.py mapping to books_pages_link
  • Added pages relationship and page_count property to the Books model
  • Added pages display to cps/templates/detail.html after the published date

The field only renders when a page count is actually present, so it's fully backwards compatible with older Calibre databases that don't have the table populated yet.

@OzzieIsaacs
Copy link
Copy Markdown
Collaborator

Without having calibre in the background to generate the page count this feature is a bit useless. This will cause 2 Billoon questions, as people don't understand why it's not working for certain books, or sometimes never

@OzzieIsaacs OzzieIsaacs closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the new pages count column of calibre

2 participants