diff --git a/src/server/internalServer_catalog_v2.cpp b/src/server/internalServer_catalog_v2.cpp index 79504e5de..48d747ba0 100644 --- a/src/server/internalServer_catalog_v2.cpp +++ b/src/server/internalServer_catalog_v2.cpp @@ -154,8 +154,7 @@ std::unique_ptr InternalServer::handle_catalog_v2_languages(const Requ std::unique_ptr InternalServer::handle_catalog_v2_illustration(const RequestContext& request) { try { - const auto bookName = request.get_url_part(3); - const auto bookId = mp_nameMapper->getIdForName(bookName); + const auto bookId = request.get_url_part(3); auto book = mp_library->getBookByIdThreadSafe(bookId); auto size = request.get_argument("size"); auto illustration = book.getIllustration(size); diff --git a/static/templates/catalog_v2_entry.xml b/static/templates/catalog_v2_entry.xml index a2526b29f..b572da69c 100644 --- a/static/templates/catalog_v2_entry.xml +++ b/static/templates/catalog_v2_entry.xml @@ -16,7 +16,7 @@ {{article_count}} {{media_count}} {{#icons}} {{/icons}} diff --git a/test/library_server.cpp b/test/library_server.cpp index 3f430c6a3..e6119dafb 100644 --- a/test/library_server.cpp +++ b/test/library_server.cpp @@ -108,7 +108,7 @@ std::string maskVariableOPDSFeedData(std::string s) " 284\n" \ " 2\n" \ " \n" \ " \n" \ " \n" \ diff --git a/test/server.cpp b/test/server.cpp index 24b46a828..034a398cb 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -72,7 +72,7 @@ const ResourceCollection resources200Uncompressible{ { WITH_ETAG, "/ROOT/raw/zimfile/meta/Creator" }, { WITH_ETAG, "/ROOT/raw/zimfile/meta/Publisher" }, - { NO_ETAG, "/ROOT/catalog/v2/illustration/zimfile?size=48" }, + { NO_ETAG, "/ROOT/catalog/v2/illustration/6f1d19d0-633f-087b-fb55-7ac324ff9baf?size=48" }, { WITH_ETAG, "/ROOT/zimfile/I/m/Ray_Charles_classic_piano_pose.jpg" }, @@ -253,7 +253,8 @@ const char* urls404[] = { "/ROOT/catalog", "/ROOT/catalog/non-existent-item", "/ROOT/catalogBLABLABLA/root.xml", - "/ROOT/catalog/v2/illustration/zimfile?size=96", + "/ROOT/catalog/v2/illustration/zimfile?size=48", + "/ROOT/catalog/v2/illustration/6f1d19d0-633f-087b-fb55-7ac324ff9baf?size=96", "/ROOT/meta", "/ROOT/meta?content=zimfile", "/ROOT/meta?content=zimfile&name=non-existent-item",