GH-1453 separate out Mojang version reading, use version file URLs
This commit is contained in:
parent
a20e2590da
commit
163a3095b1
6 changed files with 119 additions and 61 deletions
|
@ -77,6 +77,15 @@ QJsonDocument MinecraftVersion::toJson(bool saveOrder)
|
|||
}
|
||||
}
|
||||
|
||||
QString MinecraftVersion::getUrl() const
|
||||
{
|
||||
if(m_versionFileURL.isEmpty())
|
||||
{
|
||||
return QString("http://") + URLConstants::AWS_DOWNLOAD_VERSIONS + m_descriptor + "/" + m_descriptor + ".json";
|
||||
}
|
||||
return m_versionFileURL;
|
||||
}
|
||||
|
||||
VersionFilePtr MinecraftVersion::getVersionFile()
|
||||
{
|
||||
QFileInfo versionFile(QString("versions/%1/%1.dat").arg(m_descriptor));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue