From 53ae05d6755a93db5d409f7bc41ddc2f36e4c5ed Mon Sep 17 00:00:00 2001 From: Zakhar Afonin Date: Thu, 10 Jun 2021 21:39:11 +0300 Subject: [PATCH] Revert "Ely.by skin support implemented with room for the future" This reverts commit a6a627ab2dd51bbd2252b17b44cd080da4a3217f. --- application/MainWindow.cpp | 9 +-------- application/pages/global/AccountListPage.cpp | 9 +-------- buildconfig/BuildConfig.h | 4 +--- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index ea4ea252..1286007d 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -771,15 +771,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow } for (auto profile : account->profiles()) { - auto skinsBase = BuildConfig.SKINS_BASE_MOJANG; - auto skinsArg = profile.id; - if (account->loginType() == "elyby") - { - skinsBase = BuildConfig.SKINS_BASE_ELYBY; - skinsArg = profile.name; - } auto meta = Env::getInstance().metacache()->resolveEntry("skins", profile.id + ".png"); - auto action = Net::Download::makeCached(QUrl(skinsBase + skinsArg + ".png"), meta); + auto action = Net::Download::makeCached(QUrl(BuildConfig.SKINS_BASE + profile.id + ".png"), meta); skin_dls.append(action); meta->setStale(true); } diff --git a/application/pages/global/AccountListPage.cpp b/application/pages/global/AccountListPage.cpp index 8712ee64..ff3736ed 100644 --- a/application/pages/global/AccountListPage.cpp +++ b/application/pages/global/AccountListPage.cpp @@ -172,15 +172,8 @@ void AccountListPage::addAccount(const QString &errMsg) for (AccountProfile profile : account->profiles()) { - auto skinsBase = BuildConfig.SKINS_BASE_MOJANG; - auto skinsArg = profile.id; - if (account->loginType() == "elyby") - { - skinsBase = BuildConfig.SKINS_BASE_ELYBY; - skinsArg = profile.name; - } auto meta = Env::getInstance().metacache()->resolveEntry("skins", profile.id + ".png"); - auto action = Net::Download::makeCached(QUrl(skinsBase + skinsArg + ".png"), meta); + auto action = Net::Download::makeCached(QUrl(BuildConfig.SKINS_BASE + profile.id + ".png"), meta); job->addNetAction(action); meta->setStale(true); } diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h index d70f1614..b7694cbb 100644 --- a/buildconfig/BuildConfig.h +++ b/buildconfig/BuildConfig.h @@ -67,6 +67,7 @@ public: QString RESOURCE_BASE = "https://resources.download.minecraft.net/"; QString LIBRARY_BASE = "https://libraries.minecraft.net/"; + QString SKINS_BASE = "https://crafatar.com/skins/"; QString MOJANG_STATUS_URL = "https://status.mojang.com/check"; QString IMGUR_BASE_URL = "https://api.imgur.com/3/"; QString FMLLIBS_BASE_URL = "https://files.multimc.org/fmllibs/"; @@ -76,9 +77,6 @@ public: QString AUTH_BASE_MOJANG = "https://authserver.mojang.com/"; QString AUTH_BASE_ELYBY = "https://authserver.ely.by/auth/"; - QString SKINS_BASE_MOJANG = "https://crafatar.com/skins/"; - QString SKINS_BASE_ELYBY = "http://skinsystem.ely.by/skins/"; - QString MODPACKSCH_API_BASE_URL = "https://api.modpacks.ch/"; QString LEGACY_FTB_CDN_BASE_URL = "https://dist.creeper.host/FTB2/";