diff options
author | timoreo <timo.oreo34@gmail.com> | 2022-02-04 16:24:19 +0100 |
---|---|---|
committer | timoreo <timo.oreo34@gmail.com> | 2022-02-04 16:24:19 +0100 |
commit | 86935068f522dedbb6673afd7075f156648abbb6 (patch) | |
tree | d9b535e408b28f38d47c0cb877654fab01b98b81 /launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | |
parent | 00e12b776bbdc3db5bc8456b046117218ad12b83 (diff) | |
download | PrismLauncher-86935068f522dedbb6673afd7075f156648abbb6.tar.gz PrismLauncher-86935068f522dedbb6673afd7075f156648abbb6.tar.bz2 PrismLauncher-86935068f522dedbb6673afd7075f156648abbb6.zip |
Fix wrong mod file name
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp index 71574156..5a18830a 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp @@ -3,12 +3,14 @@ #include "minecraft/MinecraftInstance.h" #include "minecraft/PackProfile.h" #include "ModrinthPage.h" +#include "ui/dialogs/ModDownloadDialog.h" #include <Json.h> #include <MMCStrings.h> #include <Version.h> #include <QtMath> +#include <QMessageBox> namespace Modrinth { @@ -250,6 +252,12 @@ void Modrinth::ListModel::searchRequestFinished() void Modrinth::ListModel::searchRequestFailed(QString reason) { + if(jobPtr->first()->m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 409){ + //409 Gone, notify user to update + QMessageBox::critical(nullptr, tr("Error"), tr("Modrinth API version too old!\nPlease update PolyMC!")); + //self-destruct + ((ModDownloadDialog *)((ModrinthPage *)parent())->parentWidget())->reject(); + } jobPtr.reset(); if(searchState == ResetRequested) { |