diff options
| author | Silarn <jrim@rimpo.org> | 2019-01-31 11:10:26 -0600 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2019-02-18 21:29:26 -0600 |
| commit | 2454690813c3f37d1de291be04fc255171ec37cd (patch) | |
| tree | 93766f8ff413c3b342be6de536c047fd0f81e0eb /src/mainwindow.cpp | |
| parent | bbed7c0a3276d2d4d84dee81eee151d710142797 (diff) | |
Make mod search case insensitive, reintroduce timed update batches
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 064f817d..9368192f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -441,7 +441,7 @@ MainWindow::MainWindow(QSettings &initSettings m_ModUpdateTimer.setSingleShot(false); connect(&m_ModUpdateTimer, SIGNAL(timeout()), this, SLOT(modUpdateCheck())); - //m_ModUpdateTimer.start(300 * 1000); + m_ModUpdateTimer.start(300 * 1000); setCategoryListVisible(initSettings.value("categorylist_visible", true).toBool()); FileDialogMemory::restore(initSettings); @@ -496,7 +496,7 @@ MainWindow::MainWindow(QSettings &initSettings updatePluginCount(); updateModCount(); - //modUpdateCheck(); + modUpdateCheck(); } @@ -5564,26 +5564,22 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD for (auto mod : modsList) { QDateTime now = QDateTime::currentDateTimeUtc(); QDateTime updateTarget = mod->getLastNexusUpdate().addSecs(3600); - QDateTime queryTarget = mod->getLastNexusQuery().addDays(1); if (now >= updateTarget) { - mod->setNexusDescription(result["description"].toString()); mod->setNewestVersion(result["version"].toString()); mod->setLastNexusUpdate(QDateTime::currentDateTimeUtc()); } - - if (now >= queryTarget) { - if ((mod->endorsedState() != ModInfo::ENDORSED_NEVER) && (result.contains("endorsement"))) { - QVariantMap endorsement = result["endorsement"].toMap(); - QString endorsementStatus = endorsement["endorse_status"].toString(); - if (endorsementStatus.compare("Endorsed") == 00) - mod->setIsEndorsed(true); - else if (endorsementStatus.compare("Abstained") == 00) - mod->setNeverEndorse(); - else - mod->setIsEndorsed(false); - } - mod->setLastNexusQuery(QDateTime::currentDateTimeUtc()); + mod->setNexusDescription(result["description"].toString()); + if ((mod->endorsedState() != ModInfo::ENDORSED_NEVER) && (result.contains("endorsement"))) { + QVariantMap endorsement = result["endorsement"].toMap(); + QString endorsementStatus = endorsement["endorse_status"].toString(); + if (endorsementStatus.compare("Endorsed") == 00) + mod->setIsEndorsed(true); + else if (endorsementStatus.compare("Abstained") == 00) + mod->setNeverEndorse(); + else + mod->setIsEndorsed(false); } + mod->setLastNexusQuery(QDateTime::currentDateTimeUtc()); mod->saveMeta(); } } |
