From 1b322d8f01c787846546a6473f153cf1daa41e65 Mon Sep 17 00:00:00 2001
From: Matthieu Gautier <mgautier@kymeria.fr>
Date: Thu, 9 Feb 2023 09:47:47 +0100
Subject: [PATCH] With last version of libkiwix, Downloader now return
 shared_ptr<Download>.

---
 src/contentmanager.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/contentmanager.cpp b/src/contentmanager.cpp
index c2f4ff98..d4db50a0 100644
--- a/src/contentmanager.cpp
+++ b/src/contentmanager.cpp
@@ -173,7 +173,7 @@ QStringList ContentManager::updateDownloadInfos(QString id, const QStringList &k
         return values;
     }
     auto& b = mp_library->getBookById(id);
-    kiwix::Download* d;
+    std::shared_ptr<kiwix::Download> d;
     try {
         d = mp_downloader->getDownload(b.getDownloadId());
     } catch(...) {
@@ -270,7 +270,7 @@ QString ContentManager::downloadBook(const QString &id)
     for (auto b : booksList)
         if (b.toStdString() == book.getId())
             return "";
-    kiwix::Download *download;
+    std::shared_ptr<kiwix::Download> download;
     try {
         std::pair<std::string, std::string> downloadDir("dir", downloadPath.toStdString());
         const std::vector<std::pair<std::string, std::string>> options = { downloadDir };
