mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Add option to skip fast platform detection
Useful in case platform identifier is missing for some games in the game shelf. Using --platform with --list doesn't work when using --no-platform-detection
This commit is contained in:
parent
a708f3d5b8
commit
3834c1e612
@ -43,6 +43,7 @@ class Config
|
|||||||
bool bUseCache;
|
bool bUseCache;
|
||||||
bool bUpdateCache;
|
bool bUpdateCache;
|
||||||
bool bSaveSerials;
|
bool bSaveSerials;
|
||||||
|
bool bPlatformDetection;
|
||||||
std::string sGameRegex;
|
std::string sGameRegex;
|
||||||
std::string sDirectory;
|
std::string sDirectory;
|
||||||
std::string sCacheDirectory;
|
std::string sCacheDirectory;
|
||||||
|
3
main.cpp
3
main.cpp
@ -128,6 +128,7 @@ int main(int argc, char *argv[])
|
|||||||
bool bNoDeb = false;
|
bool bNoDeb = false;
|
||||||
bool bNoTarGz = false;
|
bool bNoTarGz = false;
|
||||||
bool bNoCover = false;
|
bool bNoCover = false;
|
||||||
|
bool bNoPlatformDetection = false;
|
||||||
config.bReport = false;
|
config.bReport = false;
|
||||||
// Commandline options (no config file)
|
// Commandline options (no config file)
|
||||||
options_cli_no_cfg.add_options()
|
options_cli_no_cfg.add_options()
|
||||||
@ -148,6 +149,7 @@ int main(int argc, char *argv[])
|
|||||||
("report", bpo::value<std::string>(&config.sReportFilePath)->implicit_value("lgogdownloader-report.log"), "Save report of downloaded/repaired files to specified file\nDefault filename: lgogdownloader-report.log")
|
("report", bpo::value<std::string>(&config.sReportFilePath)->implicit_value("lgogdownloader-report.log"), "Save report of downloaded/repaired files to specified file\nDefault filename: lgogdownloader-report.log")
|
||||||
("no-cover", bpo::value<bool>(&bNoCover)->zero_tokens()->default_value(false), "Don't download cover images. Overrides --cover option.\nUseful for making exceptions when \"cover\" is set to true in config file.")
|
("no-cover", bpo::value<bool>(&bNoCover)->zero_tokens()->default_value(false), "Don't download cover images. Overrides --cover option.\nUseful for making exceptions when \"cover\" is set to true in config file.")
|
||||||
("update-cache", bpo::value<bool>(&config.bUpdateCache)->zero_tokens()->default_value(false), "Update game details cache")
|
("update-cache", bpo::value<bool>(&config.bUpdateCache)->zero_tokens()->default_value(false), "Update game details cache")
|
||||||
|
("no-platform-detection", bpo::value<bool>(&bNoPlatformDetection)->zero_tokens()->default_value(false), "Don't try to detect supported platforms from game shelf.\nSkips the initial fast platform detection and detects the supported platforms from game details which is slower but more accurate.\nUseful in case platform identifier is missing for some games in the game shelf.\nUsing --platform with --list doesn't work with this option.")
|
||||||
;
|
;
|
||||||
// Commandline options (config file)
|
// Commandline options (config file)
|
||||||
options_cli_cfg.add_options()
|
options_cli_cfg.add_options()
|
||||||
@ -335,6 +337,7 @@ int main(int argc, char *argv[])
|
|||||||
config.bDLC = !bNoDLC;
|
config.bDLC = !bNoDLC;
|
||||||
config.bRemoteXML = !bNoRemoteXML;
|
config.bRemoteXML = !bNoRemoteXML;
|
||||||
config.bSubDirectories = !bNoSubDirectories;
|
config.bSubDirectories = !bNoSubDirectories;
|
||||||
|
config.bPlatformDetection = !bNoPlatformDetection;
|
||||||
|
|
||||||
// Override cover option
|
// Override cover option
|
||||||
if (bNoCover)
|
if (bNoCover)
|
||||||
|
@ -2060,7 +2060,7 @@ std::vector<gameItem> Downloader::getGames()
|
|||||||
platform |= GlobalConstants::PLATFORM_MAC;
|
platform |= GlobalConstants::PLATFORM_MAC;
|
||||||
|
|
||||||
// Skip if platform doesn't match
|
// Skip if platform doesn't match
|
||||||
if (!(platform & config.iInstallerType))
|
if (config.bPlatformDetection && !(platform & config.iInstallerType))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!game.name.empty() && !game.id.empty())
|
if (!game.name.empty() && !game.id.empty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user