diff --git a/include/reader.h b/include/reader.h index 9630252c2..24d8d02fc 100644 --- a/include/reader.h +++ b/include/reader.h @@ -292,16 +292,6 @@ class Reader */ string getScraper() const; - /** - * Get the origId of the zim file. - * - * The origId is only used in the case of patch zim file and is the Id - * of the original zim file. - * - * @return The origId of the zim file as specified in the zim metadata. - */ - string getOrigId() const; - /** * Get the favicon of the zim file. * diff --git a/src/reader.cpp b/src/reader.cpp index 76ce4f4cc..4f0ed922f 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -238,11 +238,6 @@ string Reader::getScraper() const } #undef METADATA -string Reader::getOrigId() const -{ - return kiwix::getArchiveOrigId(*zimArchive); -} - Entry Reader::getEntryFromPath(const std::string& path) const { try { diff --git a/src/tools/archiveTools.cpp b/src/tools/archiveTools.cpp index 6a2c06696..ebd136557 100644 --- a/src/tools/archiveTools.cpp +++ b/src/tools/archiveTools.cpp @@ -94,32 +94,7 @@ std::string getMetaFlavour(const zim::Archive& archive) { } std::string getArchiveId(const zim::Archive& archive) { - std::ostringstream s; - s << archive.getUuid(); - return s.str(); -} - -std::string getArchiveOrigId(const zim::Archive& archive) { - std::string value = getMetadata(archive, "startfileuid"); - if (value.empty()) { - return ""; - } - std::string id = value; - std::string origID; - std::string temp = ""; - unsigned int k = 0; - char tempArray[16] = ""; - for (unsigned int i = 0; i < id.size(); i++) { - if (id[i] == '\n') { - tempArray[k] = atoi(temp.c_str()); - temp = ""; - k++; - } else { - temp += id[i]; - } - } - origID = (std::string) zim::Uuid::generate(tempArray); - return origID; + return (std::string) archive.getUuid(); } bool getArchiveFavicon(const zim::Archive& archive, diff --git a/src/tools/archiveTools.h b/src/tools/archiveTools.h index 0a6638cd4..456e749e7 100644 --- a/src/tools/archiveTools.h +++ b/src/tools/archiveTools.h @@ -41,7 +41,6 @@ namespace kiwix std::string getMetaPublisher(const zim::Archive& archive); std::string getMetaFlavour(const zim::Archive& archive); std::string getArchiveId(const zim::Archive& archive); - std::string getArchiveOrigId(const zim::Archive& archive); bool getArchiveFavicon(const zim::Archive& archive, std::string& content, std::string& mimeType);