mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-23 12:07:00 -04:00
Use the encoded url when doing a request to the server.
This commit is contained in:
parent
f45ab71923
commit
639d16586f
@ -197,6 +197,7 @@ QStringList ContentManager::getDownloadIds()
|
|||||||
if (!mp_downloader)
|
if (!mp_downloader)
|
||||||
return list;
|
return list;
|
||||||
for(auto& id: mp_downloader->getDownloadIds()) {
|
for(auto& id: mp_downloader->getDownloadIds()) {
|
||||||
|
qInfo() << QString::fromStdString(id);
|
||||||
list.append(QString::fromStdString(id));
|
list.append(QString::fromStdString(id));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@ -228,11 +229,11 @@ void ContentManager::updateRemoteLibrary() {
|
|||||||
url.setPort(CATALOG_PORT);
|
url.setPort(CATALOG_PORT);
|
||||||
url.setPath("/catalog/search");
|
url.setPath("/catalog/search");
|
||||||
url.setQuery(query);
|
url.setQuery(query);
|
||||||
qInfo() << "Downloading" << url;
|
qInfo() << "Downloading" << url.toString(QUrl::FullyEncoded);
|
||||||
m_remoteLibrary = kiwix::Library();
|
m_remoteLibrary = kiwix::Library();
|
||||||
kiwix::Manager manager(&m_remoteLibrary);
|
kiwix::Manager manager(&m_remoteLibrary);
|
||||||
try {
|
try {
|
||||||
auto allContent = kiwix::download(url.toString().toStdString());
|
auto allContent = kiwix::download(url.toString(QUrl::FullyEncoded).toStdString());
|
||||||
manager.readOpds(allContent, CATALOG_HOST);
|
manager.readOpds(allContent, CATALOG_HOST);
|
||||||
} catch (runtime_error&) {}
|
} catch (runtime_error&) {}
|
||||||
emit(booksChanged());
|
emit(booksChanged());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user