diff --git a/sphaira/include/ui/menus/ghdl.hpp b/sphaira/include/ui/menus/ghdl.hpp index e42798c..213e669 100644 --- a/sphaira/include/ui/menus/ghdl.hpp +++ b/sphaira/include/ui/menus/ghdl.hpp @@ -79,14 +79,14 @@ private: void DownloadEntries(const Entry& entry); // parses the params into entry struct and calls DonwloadEntries -bool Download(const std::string& url, const std::vector& assets = {}, const std::string& pre_install_message = {}, const std::string& post_install_message = {}); +bool Download(const std::string& url, const std::vector& assets = {}, const std::string& tag = {}, const std::string& pre_install_message = {}, const std::string& post_install_message = {}); // calls the above function by pushing the asset to an array. -inline bool Download(const std::string& url, const AssetEntry& asset, const std::string& pre_install_message = {}, const std::string& post_install_message = {}) { +inline bool Download(const std::string& url, const AssetEntry& asset, const std::string& tag = {}, const std::string& pre_install_message = {}, const std::string& post_install_message = {}) { std::vector assets; assets.emplace_back(asset); - return Download(url, assets, pre_install_message, post_install_message); + return Download(url, assets, tag, pre_install_message, post_install_message); } } // namespace sphaira::ui::menu::gh diff --git a/sphaira/source/ui/menus/ghdl.cpp b/sphaira/source/ui/menus/ghdl.cpp index e31d4eb..bdd6ec0 100644 --- a/sphaira/source/ui/menus/ghdl.cpp +++ b/sphaira/source/ui/menus/ghdl.cpp @@ -460,9 +460,10 @@ void DownloadEntries(const Entry& entry) { }); } -bool Download(const std::string& url, const std::vector& assets, const std::string& pre_install_message, const std::string& post_install_message) { +bool Download(const std::string& url, const std::vector& assets, const std::string& tag, const std::string& pre_install_message, const std::string& post_install_message) { Entry entry{}; entry.url = url; + entry.tag = tag; entry.assets = assets; entry.pre_install_message = pre_install_message; entry.post_install_message = post_install_message; diff --git a/sphaira/source/ui/menus/themezer.cpp b/sphaira/source/ui/menus/themezer.cpp index 8f01afe..932b4b2 100644 --- a/sphaira/source/ui/menus/themezer.cpp +++ b/sphaira/source/ui/menus/themezer.cpp @@ -580,7 +580,7 @@ void Menu::OnFocusGained() { .path = "/switch/Switch_themes_Installer/NXThemesInstaller.nro", }; - gh::Download(NRO_URL, asset); + gh::Download(NRO_URL, asset, "latest"); } } );