mirror of https://github.com/kiwix/libkiwix.git
+ last improvement in the download manager
This commit is contained in:
parent
acf0294e78
commit
bf9bed56d7
|
@ -297,6 +297,18 @@ namespace kiwix {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Manager::setBookPath(const string id, const string path) {
|
||||
std::vector<kiwix::Book>::iterator itr;
|
||||
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
|
||||
if ( itr->id == id) {
|
||||
itr->path = path;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Manager::removeBookPaths() {
|
||||
std::vector<kiwix::Book>::iterator itr;
|
||||
for ( itr = library.books.begin(); itr != library.books.end(); ++itr ) {
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace kiwix {
|
|||
bool removeBookById(const string id);
|
||||
bool setCurrentBookId(const string id);
|
||||
bool setBookIndex(const string id, const string path, const supportedIndexType type);
|
||||
bool setBookPath(const string id, const string path);
|
||||
string getCurrentBookId();
|
||||
bool addBookFromPath(const string path, const string url = "");
|
||||
Library cloneLibrary();
|
||||
|
|
Loading…
Reference in New Issue