From 0f812c6584f507208d91873e87f16a47a43ec304 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 11 Dec 2018 17:01:33 +0100 Subject: [PATCH] The update entry of the book should be the date of the book, not the feed. --- src/opds_dumper.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/opds_dumper.cpp b/src/opds_dumper.cpp index fcfde0287..2105dc42b 100644 --- a/src/opds_dumper.cpp +++ b/src/opds_dumper.cpp @@ -50,6 +50,13 @@ std::string gen_date_str() return is.str(); } +static std::string gen_date_from_yyyy_mm_dd(const std::string& date) +{ + std::stringstream is; + is << date << "T00:00::00:Z"; + return is.str(); +} + void OPDSDumper::setOpenSearchInfo(int totalResults, int startIndex, int count) { m_totalResults = totalResults; @@ -65,7 +72,7 @@ pugi::xml_node OPDSDumper::handleBook(Book book, pugi::xml_node root_node) { ADD_TEXT_ENTRY(entry_node, "title", book.getTitle()); ADD_TEXT_ENTRY(entry_node, "id", "urn:uuid:"+book.getId()); ADD_TEXT_ENTRY(entry_node, "icon", rootLocation + "/meta?name=favicon&content=" + book.getHumanReadableIdFromPath()); - ADD_TEXT_ENTRY(entry_node, "updated", date); + ADD_TEXT_ENTRY(entry_node, "updated", gen_date_from_yyyy_mm_dd(book.getDate())); ADD_TEXT_ENTRY(entry_node, "summary", book.getDescription()); auto content_node = entry_node.append_child("link");