mirror of https://github.com/kiwix/libkiwix.git
+ content manager last imp.
This commit is contained in:
parent
526aec41d5
commit
35b4a1402f
|
@ -27,7 +27,7 @@ namespace kiwix {
|
|||
path(""),
|
||||
last(""),
|
||||
indexPath(""),
|
||||
indexType(XAPIAN),
|
||||
indexType(UNKNOWN),
|
||||
title(""),
|
||||
description(""),
|
||||
language(""),
|
||||
|
|
|
@ -31,7 +31,7 @@ using namespace std;
|
|||
|
||||
namespace kiwix {
|
||||
|
||||
enum supportedIndexType { XAPIAN, CLUCENE };
|
||||
enum supportedIndexType { UNKNOWN, XAPIAN, CLUCENE };
|
||||
|
||||
class Book {
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ namespace kiwix {
|
|||
book.readOnly = readOnly;
|
||||
book.id = bookNode.attribute("id").value();
|
||||
book.path = bookNode.attribute("path").value();
|
||||
book.last = bookNode.attribute("last").value() != "undefined" ? bookNode.attribute("last").value() : "";
|
||||
book.last = (std::string(bookNode.attribute("last").value()) != "undefined" ? bookNode.attribute("last").value() : "");
|
||||
book.indexPath = bookNode.attribute("indexPath").value();
|
||||
book.indexType = bookNode.attribute("indexType").value() == "xapian" ? XAPIAN : CLUCENE;
|
||||
book.indexType = (std::string(bookNode.attribute("indexType").value()) == "xapian" ? XAPIAN : CLUCENE);
|
||||
book.title = bookNode.attribute("title").value();
|
||||
book.description = bookNode.attribute("description").value();
|
||||
book.language = bookNode.attribute("language").value();
|
||||
|
@ -107,7 +107,7 @@ namespace kiwix {
|
|||
bookNode.append_attribute("indexPath") = itr->indexPath.c_str();
|
||||
if (itr->indexType == XAPIAN)
|
||||
bookNode.append_attribute("indexType") = "xapian";
|
||||
else
|
||||
else if (itr->indexType == CLUCENE)
|
||||
bookNode.append_attribute("indexType") = "clucene";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue