mirror of https://github.com/kiwix/libkiwix.git
+ load content manager per default if not local content detected (first start use case)
This commit is contained in:
parent
03a0316ed6
commit
215300f206
|
@ -321,6 +321,16 @@ namespace kiwix {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int Manager::getBookCount(const bool localBooks, const bool remoteBooks) {
|
||||||
|
unsigned int result = 0;
|
||||||
|
std::vector<kiwix::Book>::iterator itr;
|
||||||
|
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
|
||||||
|
if (!itr->path.empty() && localBooks || itr->path.empty() && remoteBooks)
|
||||||
|
result++;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
bool Manager::listBooks(const supportedListMode mode) {
|
bool Manager::listBooks(const supportedListMode mode) {
|
||||||
this->bookIdList.clear();
|
this->bookIdList.clear();
|
||||||
std::vector<kiwix::Book>::iterator itr;
|
std::vector<kiwix::Book>::iterator itr;
|
||||||
|
|
|
@ -58,6 +58,7 @@ namespace kiwix {
|
||||||
bool addBookFromPath(const string path, const string url = "", const bool checkMetaData = false);
|
bool addBookFromPath(const string path, const string url = "", const bool checkMetaData = false);
|
||||||
Library cloneLibrary();
|
Library cloneLibrary();
|
||||||
bool getBookById(const string id, Book &book);
|
bool getBookById(const string id, Book &book);
|
||||||
|
unsigned int getBookCount(const bool localBooks, const bool remoteBooks);
|
||||||
bool updateBookLastOpenDateById(const string id);
|
bool updateBookLastOpenDateById(const string id);
|
||||||
void removeBookPaths();
|
void removeBookPaths();
|
||||||
bool listBooks(const supportedListMode);
|
bool listBooks(const supportedListMode);
|
||||||
|
|
Loading…
Reference in New Issue