diff options
| author | Silarn <jrim@rimpo.org> | 2019-02-11 22:51:58 -0600 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2019-02-18 21:31:21 -0600 |
| commit | 42ae919c9688ec45935983f62dcbb498ca77a205 (patch) | |
| tree | 2606e8d2f4762a615ca5f799015333f4dc69add3 /src/downloadmanager.cpp | |
| parent | f7d1ce1fae80e42141198547d6c54689e085327f (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/downloadmanager.cpp')
| -rw-r--r-- | src/downloadmanager.cpp | 11 |
1 files changed, 10 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)); } |
