mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-23 03:52:35 -04:00
Avoid recopy of books
This commit is contained in:
parent
eb407956b9
commit
640f907fb2
@ -1085,7 +1085,7 @@ int main(int argc, char** argv)
|
|||||||
globalSearcher->setProtocolPrefix(rootLocation + "/");
|
globalSearcher->setProtocolPrefix(rootLocation + "/");
|
||||||
globalSearcher->setSearchProtocolPrefix(rootLocation + "/" + "search?");
|
globalSearcher->setSearchProtocolPrefix(rootLocation + "/" + "search?");
|
||||||
for (auto& bookId: booksIds) {
|
for (auto& bookId: booksIds) {
|
||||||
auto currentBook = library.getBookById(bookId);
|
auto& currentBook = library.getBookById(bookId);
|
||||||
auto zimPath = currentBook.getPath();
|
auto zimPath = currentBook.getPath();
|
||||||
auto indexPath = currentBook.getIndexPath();
|
auto indexPath = currentBook.getIndexPath();
|
||||||
|
|
||||||
@ -1129,7 +1129,7 @@ int main(int argc, char** argv)
|
|||||||
= ""
|
= ""
|
||||||
"<div class='book__list'>";
|
"<div class='book__list'>";
|
||||||
for (auto& bookId: booksIds) {
|
for (auto& bookId: booksIds) {
|
||||||
auto currentBook = library.getBookById(bookId);
|
auto& currentBook = library.getBookById(bookId);
|
||||||
|
|
||||||
if (!currentBook.getPath().empty()
|
if (!currentBook.getPath().empty()
|
||||||
&& readers.find(currentBook.getHumanReadableIdFromPath())
|
&& readers.find(currentBook.getHumanReadableIdFromPath())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user