Remove OriginId functions since they are not useful right now

This commit is contained in:
Maneesh P M
2021-07-07 23:44:45 +05:30
committed by Matthieu Gautier
parent a3ba7619df
commit 19afe9442f
4 changed files with 1 additions and 42 deletions

View File

@ -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 {

View File

@ -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,

View File

@ -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);