From b2027b397c34d27f318a53661fce094f0b795ab4 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Thu, 10 Jun 2021 11:56:51 +0400 Subject: [PATCH] List of languages entry in /catalog/v2/root.xml Added a new entry in /catalog/v2/root.xml that points to a not-yet-existing list of languages navigation feed. --- src/server/internalServer_catalog_v2.cpp | 3 ++- static/templates/catalog_v2_root.xml | 9 +++++++++ test/server.cpp | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/server/internalServer_catalog_v2.cpp b/src/server/internalServer_catalog_v2.cpp index d4fc9fbef..879d059c2 100644 --- a/src/server/internalServer_catalog_v2.cpp +++ b/src/server/internalServer_catalog_v2.cpp @@ -74,7 +74,8 @@ std::unique_ptr InternalServer::handle_catalog_v2_root(const RequestCo {"endpoint_root", m_root + "/catalog/v2"}, {"feed_id", gen_uuid(m_library_id)}, {"all_entries_feed_id", gen_uuid(m_library_id + "/entries")}, - {"category_list_feed_id", gen_uuid(m_library_id + "/categories")} + {"category_list_feed_id", gen_uuid(m_library_id + "/categories")}, + {"language_list_feed_id", gen_uuid(m_library_id + "/languages")} }, "application/atom+xml;profile=opds-catalog;kind=navigation" ); diff --git a/static/templates/catalog_v2_root.xml b/static/templates/catalog_v2_root.xml index 44db61c13..9aec1cbad 100644 --- a/static/templates/catalog_v2_root.xml +++ b/static/templates/catalog_v2_root.xml @@ -32,4 +32,13 @@ {{category_list_feed_id}} List of all categories in this catalog. + + List of languages + + {{date}} + {{language_list_feed_id}} + List of all languages in this catalog. + diff --git a/test/server.cpp b/test/server.cpp index 749474bbe..6db353234 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -942,6 +942,15 @@ TEST_F(LibraryServerTest, catalog_v2_root) 12345678-90ab-cdef-1234-567890abcdef List of all categories in this catalog. + + List of languages + + YYYY-MM-DDThh:mm:ssZ + 12345678-90ab-cdef-1234-567890abcdef + List of all languages in this catalog. + )"; EXPECT_EQ(maskVariableOPDSFeedData(r->body), expected_output);