1
0
Fork 0
mirror of https://github.com/HamletDuFromage/aio-switch-updater.git synced 2024-11-08 11:31:43 +00:00

Add fallback for archive.org link format

This commit is contained in:
Angelo Elias Dalzotto 2022-04-25 11:59:48 -03:00
parent 11fe274dc6
commit 74dfaeab42

View file

@ -52,10 +52,13 @@ void ListDownloadTab::createList()
void ListDownloadTab::createList(contentType type)
{
std::vector<std::pair<std::string, std::string>> links;
if (type == contentType::cheats && this->newCheatsVer != "")
if (type == contentType::cheats && this->newCheatsVer != "") {
links.push_back(std::make_pair(fmt::format("menus/main/get_cheats"_i18n, this->newCheatsVer), CurrentCfw::running_cfw == CFW::sxos ? CHEATS_URL_TITLES : CHEATS_URL_CONTENTS));
else
} else {
links = download::getLinksFromJson(util::getValueFromKey(this->nxlinks, contentTypeNames[(int)type].data()));
if(links.empty() && type == contentType::megafw)
links = download::getLinksFromJson(util::getValueFromKey(this->nxlinks, contentTypeNames[(int)contentType::fw].data()));
}
if (links.size()) {
for (const auto& link : links) {