mirror of
https://github.com/HamletDuFromage/aio-switch-updater.git
synced 2024-11-08 19:41:49 +00:00
Add fallback for archive.org link format
This commit is contained in:
parent
11fe274dc6
commit
74dfaeab42
1 changed files with 5 additions and 2 deletions
|
@ -52,10 +52,13 @@ void ListDownloadTab::createList()
|
||||||
void ListDownloadTab::createList(contentType type)
|
void ListDownloadTab::createList(contentType type)
|
||||||
{
|
{
|
||||||
std::vector<std::pair<std::string, std::string>> links;
|
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));
|
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()));
|
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()) {
|
if (links.size()) {
|
||||||
for (const auto& link : links) {
|
for (const auto& link : links) {
|
||||||
|
|
Loading…
Reference in a new issue