summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2019-02-11 22:51:58 -0600
committerSilarn <jrim@rimpo.org>2019-02-18 21:31:21 -0600
commit42ae919c9688ec45935983f62dcbb498ca77a205 (patch)
tree2606e8d2f4762a615ca5f799015333f4dc69add3 /src
parentf7d1ce1fae80e42141198547d6c54689e085327f (diff)
Fix issue with downloads not being remove on failure
Also adds helpful message when API key is not valid or present
Diffstat (limited to 'src')
-rw-r--r--src/downloadmanager.cpp11
-rw-r--r--src/nexusinterface.cpp2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 24942a06..df69d17a 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -1671,7 +1671,16 @@ void DownloadManager::nxmRequestFailed(QString gameName, int modID, int fileID,
}
}
- removePending(gameName, modID, fileID);
+ QString gameRealName;
+ QStringList games(m_ManagedGame->validShortNames());
+ games += m_ManagedGame->gameShortName();
+ for (auto game : games) {
+ MOBase::IPluginGame *gamePlugin = m_OrganizerCore->getGame(game);
+ if (gamePlugin->gameNexusName().compare(gameName, Qt::CaseInsensitive) == 0) {
+ gameRealName = gamePlugin->gameShortName();
+ }
+ }
+ removePending(gameRealName, modID, fileID);
emit showMessage(tr("Failed to request file info from nexus: %1").arg(errorString));
}
diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp
index 265d898c..89b0bfde 100644
--- a/src/nexusinterface.cpp
+++ b/src/nexusinterface.cpp
@@ -539,6 +539,8 @@ void NexusInterface::nextRequest()
return;
} else if (getAccessManager()->validateWaiting()) {
return;
+ } else {
+ qCritical("You must authorize MO2 in Settings -> Nexus to use the Nexus API.");
}
}