mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-27 21:39:37 +00:00
Remove OriginId functions since they are not useful right now
This commit is contained in:
committed by
Matthieu Gautier
parent
a3ba7619df
commit
19afe9442f
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user