diff options
| author | Silarn <jrim@rimpo.org> | 2019-02-06 17:09:32 -0600 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2019-02-18 21:31:20 -0600 |
| commit | b59c44aaa16fc286159059a2b940c144a577e01a (patch) | |
| tree | 23e606d9481326008dc42f4d3a26b64418445d99 /src/mainwindow.cpp | |
| parent | 3f86a94ff73914460db72c1f20eca075de8caea6 (diff) | |
Some fixes to parse the preferred server list and download speed feature
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ce476143..a17b51d5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5622,11 +5622,10 @@ void MainWindow::nxmDownloadURLs(QString, int, int, QVariant, QVariant resultDat for (const QVariant &server : serverList) { QVariantMap serverInfo = server.toMap(); ServerInfo info; - info.name = serverInfo["Name"].toString(); - info.premium = serverInfo["IsPremium"].toBool(); + info.name = serverInfo["short_name"].toString(); + info.premium = serverInfo["name"].toString().contains("Premium", Qt::CaseInsensitive); info.lastSeen = QDate::currentDate(); - info.preferred = !info.name.compare("CDN", Qt::CaseInsensitive); - // other keys: ConnectedUsers, Country, URI + info.preferred = serverInfo["short_name"].toString().contains("CDN", Qt::CaseInsensitive); servers.append(info); } m_OrganizerCore.settings().updateServers(servers); |
