diff --git a/src/opds_dumper.cpp b/src/opds_dumper.cpp index a8b1be9e..bdb21be7 100644 --- a/src/opds_dumper.cpp +++ b/src/opds_dumper.cpp @@ -150,17 +150,17 @@ string OPDSDumper::dumpOPDSFeedV2(const std::vector& bookIds, const const auto booksData = getBooksData(library, nameMapper, bookIds, rootLocation, partial); const char* const endpoint = partial ? "/partial_entries" : "/entries"; + const std::string url = endpoint + (query.empty() ? "" : "?" + query); const kainjow::mustache::object template_data{ {"date", gen_date_str()}, {"endpoint_root", endpointRoot}, {"feed_id", gen_uuid(libraryId + endpoint + "?" + query)}, {"filter", onlyAsNonEmptyMustacheValue(query)}, - {"query", query.empty() ? "" : "?" + query}, + {"self_url", url}, {"totalResults", to_string(m_totalResults)}, {"startIndex", to_string(m_startIndex)}, {"itemsPerPage", to_string(m_count)}, - {"books", booksData }, - {"dump_partial_entries", MustacheData(partial)} + {"books", booksData } }; return render_template(RESOURCE::templates::catalog_v2_entries_xml, template_data); diff --git a/static/templates/catalog_v2_entries.xml b/static/templates/catalog_v2_entries.xml index c0eb9dcc..264c728d 100644 --- a/static/templates/catalog_v2_entries.xml +++ b/static/templates/catalog_v2_entries.xml @@ -6,7 +6,7 @@ {{feed_id}}