diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-06-30 11:03:59 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-06-30 11:03:59 +0200 |
commit | 63330bf1113e0da3f2733ec9d6ad98fc13ad4bb7 (patch) | |
tree | 67c5f8a80cbc74e1cd58aa965a694311cf07b8ee /application/pages/modplatform | |
parent | f74e3db804f2fb3d73cbf7ab5fbdb12ecea0f259 (diff) | |
download | MultiMC-63330bf1113e0da3f2733ec9d6ad98fc13ad4bb7.tar MultiMC-63330bf1113e0da3f2733ec9d6ad98fc13ad4bb7.tar.gz MultiMC-63330bf1113e0da3f2733ec9d6ad98fc13ad4bb7.tar.lz MultiMC-63330bf1113e0da3f2733ec9d6ad98fc13ad4bb7.tar.xz MultiMC-63330bf1113e0da3f2733ec9d6ad98fc13ad4bb7.zip |
NOISSUE connect twitch URL resolving to modpack resolving. works now.
Diffstat (limited to 'application/pages/modplatform')
-rw-r--r-- | application/pages/modplatform/TwitchPage.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/application/pages/modplatform/TwitchPage.cpp b/application/pages/modplatform/TwitchPage.cpp index 2f138b94..52d87fa4 100644 --- a/application/pages/modplatform/TwitchPage.cpp +++ b/application/pages/modplatform/TwitchPage.cpp @@ -3,6 +3,7 @@ #include "MultiMC.h" #include "dialogs/NewInstanceDialog.h" +#include <InstanceImportTask.h> TwitchPage::TwitchPage(NewInstanceDialog* dialog, QWidget *parent) : QWidget(parent), ui(new Ui::TwitchPage), dialog(dialog) @@ -42,6 +43,13 @@ void TwitchPage::checkDone() { auto result = m_modIdResolver->getResults(); auto formatted = QString("Project %1, File %2").arg(result.projectId).arg(result.fileId); - ui->twitchLabel->setText(formatted); + if(result.resolved && result.type == Flame::File::Type::Modpack) { + ui->twitchLabel->setText(formatted); + QFileInfo fi(result.fileName); + dialog->setSuggestedPack(fi.completeBaseName(), new InstanceImportTask(result.url)); + } else { + ui->twitchLabel->setPixmap(QPixmap(QString::fromUtf8(":/assets/deadglitch"))); + dialog->setSuggestedPack(); + } m_modIdResolver.reset(); } |