mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 09:08:42 +00:00
Ely.by skin support implemented with room for the future
This commit is contained in:
@@ -771,8 +771,15 @@ 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(BuildConfig.SKINS_BASE + profile.id + ".png"), meta);
|
||||
auto action = Net::Download::makeCached(QUrl(skinsBase + skinsArg + ".png"), meta);
|
||||
skin_dls.append(action);
|
||||
meta->setStale(true);
|
||||
}
|
||||
|
@@ -172,8 +172,15 @@ 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(BuildConfig.SKINS_BASE + profile.id + ".png"), meta);
|
||||
auto action = Net::Download::makeCached(QUrl(skinsBase + skinsArg + ".png"), meta);
|
||||
job->addNetAction(action);
|
||||
meta->setStale(true);
|
||||
}
|
||||
|
@@ -67,7 +67,6 @@ 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/";
|
||||
@@ -77,6 +76,9 @@ 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/";
|
||||
|
Reference in New Issue
Block a user