From 69048954e4095f65baac8b07e4c98f37bd9e92ab Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Sat, 18 Jul 2026 21:19:20 -0400 Subject: [PATCH] fix(opds): add inline search template for simpler clients Some OPDS clients (e.g. crosspoint-reader) don't resolve the OpenSearch descriptor and only detect search via a rel="search" link whose href contains {searchTerms} directly. Add such a link alongside the existing descriptor so these clients can search. --- api/opds-routes.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/opds-routes.go b/api/opds-routes.go index 17cceea..c515bd9 100644 --- a/api/opds-routes.go +++ b/api/opds-routes.go @@ -39,6 +39,14 @@ func (api *API) opdsEntry(c *gin.Context) { TypeLink: "application/opensearchdescription+xml", Href: "/api/opds/search.xml", }, + // Inline Search Template - Simpler OPDS clients (e.g. crosspoint-reader) don't resolve the + // OpenSearch descriptor and require the {searchTerms} template directly on a rel="search" link. + { + Title: "Search AnthoLume", + Rel: "search", + TypeLink: "application/atom+xml;profile=opds-catalog;kind=acquisition", + Href: "/api/opds/documents?search={searchTerms}", + }, }, Entries: []opds.Entry{