From 85d64caa6729772cc14ad7431655d135e7506708 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Fri, 12 Jul 2024 16:45:32 +0200 Subject: [PATCH 1/2] Fix return value for Manager::parseOpdsDom --- src/manager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/manager.cpp b/src/manager.cpp index ba4d0c75f..30e58586b 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -143,9 +143,8 @@ bool Manager::parseOpdsDom(const pugi::xml_document& doc, const std::string& url m_totalBooks = strtoull(libraryNode.child("totalResults").child_value(), 0, 0); m_startIndex = strtoull(libraryNode.child("startIndex").child_value(), 0, 0); m_itemsPerPage = strtoull(libraryNode.child("itemsPerPage").child_value(), 0, 0); - m_hasSearchResult = true; } catch(...) { - m_hasSearchResult = false; + return false; } for (pugi::xml_node entryNode = libraryNode.child("entry"); entryNode; From 6a048ec77ce83e2289b8d05d4b7ce71f8d8c485f Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sat, 20 Jul 2024 12:50:27 +0200 Subject: [PATCH 2/2] Revert m_hasSearchResult changes --- src/manager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/manager.cpp b/src/manager.cpp index 30e58586b..2c3e533f8 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -143,7 +143,9 @@ bool Manager::parseOpdsDom(const pugi::xml_document& doc, const std::string& url m_totalBooks = strtoull(libraryNode.child("totalResults").child_value(), 0, 0); m_startIndex = strtoull(libraryNode.child("startIndex").child_value(), 0, 0); m_itemsPerPage = strtoull(libraryNode.child("itemsPerPage").child_value(), 0, 0); + m_hasSearchResult = true; } catch(...) { + m_hasSearchResult = false; return false; }