mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Override global config values in Downloader::checkOrphans
Previously orphan checking was limited to user selected language and platform values. This meant that by default only English language and Windows+Linux was selected. Overriding the global config values and clearing previously got details before starting the orphan check makes --check-orphans work as intended.
This commit is contained in:
parent
8f69f44bb1
commit
56a06133d2
@ -1743,11 +1743,25 @@ static int isPresent(std::vector<gameFile>& list, const boost::filesystem::path&
|
|||||||
void Downloader::checkOrphans()
|
void Downloader::checkOrphans()
|
||||||
{
|
{
|
||||||
// Always check everything when checking for orphaned files
|
// Always check everything when checking for orphaned files
|
||||||
|
Globals::globalConfig.dlConf.bInstallers = true;
|
||||||
|
Globals::globalConfig.dlConf.bExtras = true;
|
||||||
|
Globals::globalConfig.dlConf.bPatches = true;
|
||||||
|
Globals::globalConfig.dlConf.bLanguagePacks = true;
|
||||||
|
Globals::globalConfig.dlConf.bDLC = true;
|
||||||
|
Globals::globalConfig.dlConf.iInstallerLanguage = Util::getOptionValue("all", GlobalConstants::LANGUAGES);
|
||||||
|
Globals::globalConfig.dlConf.iInstallerPlatform = Util::getOptionValue("all", GlobalConstants::PLATFORMS);
|
||||||
|
Globals::globalConfig.dlConf.vLanguagePriority.clear();
|
||||||
|
Globals::globalConfig.dlConf.vPlatformPriority.clear();
|
||||||
Config config = Globals::globalConfig;
|
Config config = Globals::globalConfig;
|
||||||
config.dlConf.bInstallers = true;
|
|
||||||
config.dlConf.bExtras = true;
|
// Checking orphans after download.
|
||||||
config.dlConf.bPatches = true;
|
// Game details have already been retrieved but possibly filtered.
|
||||||
config.dlConf.bLanguagePacks = true;
|
// Therefore we need to clear game details and get them again.
|
||||||
|
if (config.bDownload)
|
||||||
|
{
|
||||||
|
this->gameItems.clear();
|
||||||
|
this->games.clear();
|
||||||
|
}
|
||||||
|
|
||||||
if (this->games.empty())
|
if (this->games.empty())
|
||||||
this->getGameDetails();
|
this->getGameDetails();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user