mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-21 19:18:39 -04:00
Moved the check for availability of downloading functionality
This commit is contained in:
parent
f8a140404e
commit
04a6d6c05a
@ -597,9 +597,6 @@ QString ContentManager::getRemoteLibraryUrl() const
|
||||
|
||||
void ContentManager::downloadBook(const QString &id)
|
||||
{
|
||||
if ( ! DownloadManager::downloadingFunctionalityAvailable() )
|
||||
throwDownloadUnavailableError();
|
||||
|
||||
const auto& book = getRemoteOrLocalBook(id);
|
||||
|
||||
const auto downloadPath = getSettingsManager()->getDownloadDir();
|
||||
|
@ -137,6 +137,9 @@ DownloadInfo DownloadManager::getDownloadInfo(QString bookId) const
|
||||
|
||||
std::string DownloadManager::startDownload(const kiwix::Book& book, const std::string& downloadDirPath)
|
||||
{
|
||||
if ( ! DownloadManager::downloadingFunctionalityAvailable() )
|
||||
throw std::runtime_error("Downloading functionality is not available");
|
||||
|
||||
typedef std::vector<std::pair<std::string, std::string>> DownloadOptions;
|
||||
|
||||
const std::string& url = book.getUrl();
|
||||
|
Loading…
x
Reference in New Issue
Block a user