Merge pull request #47 from kiwix/fix_catalog_url

Correctly set the catalog host and port.
This commit is contained in:
Matthieu Gautier 2018-10-31 16:08:49 +01:00 committed by GitHub
commit f30c4aace5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,8 @@ void ContentManager::setCurrentLanguage(QString language)
emit(currentLangChanged());
}
#define CATALOG_HOST "http://library.kiwix.org"
#define CATALOG_HOST "library.kiwix.org"
#define CATALOG_PORT 80
void ContentManager::updateRemoteLibrary() {
QUrlQuery query;
query.addQueryItem("lang", m_currentLanguage);
@ -208,8 +209,8 @@ void ContentManager::updateRemoteLibrary() {
query.addQueryItem("start", QString::number(getStartBookIndex()));
QUrl url;
url.setScheme("http");
url.setHost("localhost");
url.setPort(8080);
url.setHost(CATALOG_HOST);
url.setPort(CATALOG_PORT);
url.setPath("/catalog/search.xml");
url.setQuery(query);
qInfo() << "Downloading" << url;