mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-03 16:51:30 +00:00
GH-4699 Clean some things up
Add a menu to select between MMC/Modrinth format packs instead of the custom dialog Treat 404s on requests to the Modrinth API as success, as the API returns a 404 if a hash was not found, and we don't want to retry the download in this case Improve logging
This commit is contained in:
@@ -122,6 +122,13 @@ void Download::downloadError(QNetworkReply::NetworkError error)
|
||||
qCritical() << "Aborted " << m_url.toString();
|
||||
m_status = Job_Aborted;
|
||||
}
|
||||
else if(error == QNetworkReply::ContentNotFoundError && (m_options & Option::AllowNotFound))
|
||||
{
|
||||
// The Modrinth API returns a 404 when a hash was not found when performing reverse hash lookup, we don't want to treat this as a failure
|
||||
qDebug() << "Received 404 from " << m_url.toString() << ", continuing...";
|
||||
m_status = Job_Finished;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_options & Option::AcceptLocalFiles)
|
||||
|
@@ -32,7 +32,8 @@ public: /* types */
|
||||
enum class Option
|
||||
{
|
||||
NoOptions = 0,
|
||||
AcceptLocalFiles = 1
|
||||
AcceptLocalFiles = 1,
|
||||
AllowNotFound =2
|
||||
};
|
||||
Q_DECLARE_FLAGS(Options, Option)
|
||||
|
||||
|
Reference in New Issue
Block a user