diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-22 23:18:25 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-22 23:18:25 -0400 |
| commit | d9cdc244619c42b6f140e8ab6815bc7409231644 (patch) | |
| tree | a295ecf24a5cab0f7e64b0308bb1ab1fb3a6b964 /src/modinfo.cpp | |
| parent | 3ef7c401d547d0ca1ace90a1132ad36e3e133eba (diff) | |
| parent | 2f0cfa2930b5876319c5a3a1b0ddd7989d0ec51e (diff) | |
Merge remote-tracking branch 'remotes/upstream/Develop' into Develop
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index c1974152..bc2979ef 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -313,19 +313,23 @@ bool ModInfo::checkAllForUpdate(PluginContainer *pluginContainer, QObject *recei if (latest < QDateTime::currentDateTimeUtc().addDays(-30)) { std::set<std::pair<QString, int>> organizedGames; for (auto mod : s_Collection) { - if (mod->canBeUpdated()) { + if (mod->canBeUpdated() && mod->getLastNexusUpdate() < QDateTime::currentDateTimeUtc().addDays(-30)) { organizedGames.insert(std::make_pair<QString, int>(mod->getGameName().toLower(), mod->getNexusID())); } } if (organizedGames.empty()) { - qWarning("All of your mods have been checked recently. We restrict update checks to help preserve your available API requests."); + qWarning() << tr("All of your mods have been checked recently. We restrict update checks to help preserve your available API requests."); updatesAvailable = false; + } else { + qInfo() << tr( + "You have mods that haven't been checked within 30 days using the new API. These mods must be checked before we can use the bulk update API. " + "This will consume significantly more API requests than usual. You will need to rerun the update check once complete in order to parse the remaining mods." + ); } - for (auto game : organizedGames) { + for (auto game : organizedGames) NexusInterface::instance(pluginContainer)->requestUpdates(game.second, receiver, QVariant(), game.first, QString()); - } } else if (earliest < QDateTime::currentDateTimeUtc().addDays(-30)) { for (auto gameName : games) NexusInterface::instance(pluginContainer)->requestUpdateInfo(gameName, NexusInterface::UpdatePeriod::MONTH, receiver, QVariant(true), QString()); |
