github new-usemame/Calibre-Web-NextGen v4.0.58
v4.0.58 — OPDS polish (ratings, sentinel pubdate, fork URL, 404 catch-all)

latest releases: v4.1.4, v4.1.3, v4.1.2...
one month ago

Four small OPDS bugs reported by @droM4X against v4.0.57, bundled because they're in the same layer and verify together end-to-end. Ratings render as clean digits, books with no real pubdate stop reporting "Invalid Date" in OPDS clients like Readest, the feed headers point at the fork tracker, and forged URLs return a proper 404 instead of the HTML web page.

docker pull ghcr.io/new-usemame/calibre-web-nextgen:v4.0.58
docker pull ghcr.io/new-usemame/calibre-web-nextgen:latest

Fixes (user-facing)

  • /opds/ratings titles render as plain digits (closes #180). Each rating bucket used to display as e.g. 3.0000000000 Stars because the rating column comes back as a Decimal with ten trailing zeros. They now show as 3 Stars, 5 Stars, etc. Half-star ratings still render as 2.5 Stars cleanly. Thanks @droM4X for the report.

  • No more "Invalid Date" for books without a real pubdate (closes #181). Calibre stores 0101-01-01 as its "no pubdate set" sentinel. The OPDS feed used to emit that as <published>0101-01-01T00:00:00+00:00</published>, which OPDS clients (Readest in particular) display as "Invalid Date." The OPDS spec marks <published> as optional, so the feed now omits the element only for the sentinel. Books with real historical pubdates (Don Quixote 1605, etc.) still emit theirs.

  • Feed headers point at the fork tracker (closes #182). <author><uri> in the OPDS feed XML and <Contact> in the OpenSearch description used to advertise the upstream repo URL. They now point at this fork so an OPDS client following the link lands where issues actually get triaged. The regression-test allowlist for upstream URLs in templates now covers .xml, so a future change can't reintroduce it silently.

  • Forged OPDS URLs return 404, not the books page (closes #183). /opds/test or any other unmatched path under /opds/ used to fall through to the HTML books grid. They now return 404 with application/atom+xml; charset=utf-8 and a small Atom error body — what an OPDS client expects. Multi-segment forged paths (/opds/a/b/c) get the same treatment.

Verification

Live-verified end-to-end on cwn-local (freshly rebuilt image, 21-book sample library, Readest User-Agent):

  • /opds/ratings2.5 Stars, 3 Stars, 4 Stars, 5 Stars
  • /opds/discover → 20 books emit <published>, only The Picture of Dorian Gray (the one sentinel-pubdate book in the library) omits it
  • /opds<uri>https://github.com/new-usemame/Calibre-Web-NextGen</uri>
  • Nine OPDS endpoints (/opds, /opds/books, /opds/new, /opds/discover, /opds/ratings, /opds/author, /opds/category, /opds/series, /opds/osd) → all 200
  • /opds/test, /opds/test/, /opds/foo/bar, /opds/totally-bogus → all 404 with application/atom+xml; charset=utf-8
  • 20 concurrent forged-path requests → all 404, no errors
  • Zero new ERROR / WARN / Traceback lines in container logs since the rebuild
  • 28 new regression tests in tests/unit/test_opds_bugs_180_181_182_183.py pin each fix; full local OPDS suite (61 tests) green

CHANGES rows

See CHANGES-vs-upstream.md for per-PR detail.

Don't miss a new Calibre-Web-NextGen release

NewReleases is sending notifications on new releases.