mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 03:39:17 +01:00
Change --wishlist into --list option
Remove --wishlist Add --list wishlist
This commit is contained in:
parent
0e3c1572c1
commit
8dce7a3f0b
@ -242,7 +242,6 @@ class Config
|
|||||||
bool bUpdated;
|
bool bUpdated;
|
||||||
bool bNew;
|
bool bNew;
|
||||||
bool bCheckStatus;
|
bool bCheckStatus;
|
||||||
bool bShowWishlist;
|
|
||||||
bool bNotifications;
|
bool bNotifications;
|
||||||
bool bIncludeHiddenProducts;
|
bool bIncludeHiddenProducts;
|
||||||
bool bSizeOnly;
|
bool bSizeOnly;
|
||||||
|
@ -108,6 +108,7 @@ namespace GlobalConstants
|
|||||||
const unsigned int LIST_FORMAT_TAGS = 1 << 3;
|
const unsigned int LIST_FORMAT_TAGS = 1 << 3;
|
||||||
const unsigned int LIST_FORMAT_TRANSFORMATIONS = 1 << 4;
|
const unsigned int LIST_FORMAT_TRANSFORMATIONS = 1 << 4;
|
||||||
const unsigned int LIST_FORMAT_USERDATA = 1 << 5;
|
const unsigned int LIST_FORMAT_USERDATA = 1 << 5;
|
||||||
|
const unsigned int LIST_FORMAT_WISHLIST = 1 << 6;
|
||||||
|
|
||||||
const std::vector<optionsStruct> LIST_FORMAT =
|
const std::vector<optionsStruct> LIST_FORMAT =
|
||||||
{
|
{
|
||||||
@ -116,7 +117,8 @@ namespace GlobalConstants
|
|||||||
{ LIST_FORMAT_DETAILS_JSON, "json", "JSON", "j|json" },
|
{ LIST_FORMAT_DETAILS_JSON, "json", "JSON", "j|json" },
|
||||||
{ LIST_FORMAT_TAGS, "tags", "Tags", "t|tags" },
|
{ LIST_FORMAT_TAGS, "tags", "Tags", "t|tags" },
|
||||||
{ LIST_FORMAT_TRANSFORMATIONS, "transform", "Transformations", "tr|transform|transformations" },
|
{ LIST_FORMAT_TRANSFORMATIONS, "transform", "Transformations", "tr|transform|transformations" },
|
||||||
{ LIST_FORMAT_USERDATA, "userdata", "User data", "ud|userdata" }
|
{ LIST_FORMAT_USERDATA, "userdata", "User data", "ud|userdata" },
|
||||||
|
{ LIST_FORMAT_WISHLIST, "wishlist", "Wishlist", "w|wishlist" }
|
||||||
};
|
};
|
||||||
|
|
||||||
const unsigned int GFTYPE_BASE_INSTALLER = 1 << 0;
|
const unsigned int GFTYPE_BASE_INSTALLER = 1 << 0;
|
||||||
|
5
main.cpp
5
main.cpp
@ -227,7 +227,6 @@ int main(int argc, char *argv[])
|
|||||||
("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.")
|
("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.")
|
||||||
("download-file", bpo::value<std::string>(&Globals::globalConfig.sFileIdString)->default_value(""), "Download files using fileid\n\nFormat:\n\"gamename/fileid\"\n\"gamename/dlc_gamename/fileid\"\n\"gogdownloader://gamename/fileid\"\n\"gogdownloader://gamename/dlc_name/fileid\"\n\nMultiple files:\n\"gamename1/fileid1,gamename2/fileid2,gamename2/dlcname/fileid1\"\n\nThis option ignores all subdir options. The files are downloaded to directory specified with --directory option.")
|
("download-file", bpo::value<std::string>(&Globals::globalConfig.sFileIdString)->default_value(""), "Download files using fileid\n\nFormat:\n\"gamename/fileid\"\n\"gamename/dlc_gamename/fileid\"\n\"gogdownloader://gamename/fileid\"\n\"gogdownloader://gamename/dlc_name/fileid\"\n\nMultiple files:\n\"gamename1/fileid1,gamename2/fileid2,gamename2/dlcname/fileid1\"\n\nThis option ignores all subdir options. The files are downloaded to directory specified with --directory option.")
|
||||||
("output-file,o", bpo::value<std::string>(&Globals::globalConfig.sOutputFilename)->default_value(""), "Set filename of file downloaded with --download-file.")
|
("output-file,o", bpo::value<std::string>(&Globals::globalConfig.sOutputFilename)->default_value(""), "Set filename of file downloaded with --download-file.")
|
||||||
("wishlist", bpo::value<bool>(&Globals::globalConfig.bShowWishlist)->zero_tokens()->default_value(false), "Show wishlist")
|
|
||||||
("cacert", bpo::value<std::string>(&Globals::globalConfig.curlConf.sCACertPath)->default_value(""), "Path to CA certificate bundle in PEM format")
|
("cacert", bpo::value<std::string>(&Globals::globalConfig.curlConf.sCACertPath)->default_value(""), "Path to CA certificate bundle in PEM format")
|
||||||
("respect-umask", bpo::value<bool>(&Globals::globalConfig.bRespectUmask)->zero_tokens()->default_value(false), "Do not adjust permissions of sensitive files")
|
("respect-umask", bpo::value<bool>(&Globals::globalConfig.bRespectUmask)->zero_tokens()->default_value(false), "Do not adjust permissions of sensitive files")
|
||||||
("user-agent", bpo::value<std::string>(&Globals::globalConfig.curlConf.sUserAgent)->default_value(DEFAULT_USER_AGENT), "Set user agent")
|
("user-agent", bpo::value<std::string>(&Globals::globalConfig.curlConf.sUserAgent)->default_value(DEFAULT_USER_AGENT), "Set user agent")
|
||||||
@ -802,9 +801,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
if (Globals::globalConfig.bShowWishlist)
|
if (Globals::globalConfig.bUpdateCache)
|
||||||
downloader.showWishlist();
|
|
||||||
else if (Globals::globalConfig.bUpdateCache)
|
|
||||||
downloader.updateCache();
|
downloader.updateCache();
|
||||||
else if (Globals::globalConfig.bNotifications)
|
else if (Globals::globalConfig.bNotifications)
|
||||||
downloader.checkNotifications();
|
downloader.checkNotifications();
|
||||||
|
@ -48,6 +48,8 @@ Tags = t|tags
|
|||||||
Transformations = tr|transform|transformations
|
Transformations = tr|transform|transformations
|
||||||
.br
|
.br
|
||||||
User data = ud|userdata
|
User data = ud|userdata
|
||||||
|
.br
|
||||||
|
Wishlist = w|wishlist
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-download\fR
|
\fB\-\-download\fR
|
||||||
@ -158,9 +160,6 @@ The files are downloaded to directory specified with \fB\-\-directory\fR option.
|
|||||||
\fB\-o\fR [ \fB\-\-output\-file\fR ] arg
|
\fB\-o\fR [ \fB\-\-output\-file\fR ] arg
|
||||||
Set filename of file downloaded with \fB\-\-download\-file\fR.
|
Set filename of file downloaded with \fB\-\-download\-file\fR.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-wishlist\fR
|
|
||||||
Show wishlist
|
|
||||||
.TP
|
|
||||||
\fB\-\-cacert\fR arg
|
\fB\-\-cacert\fR arg
|
||||||
Path to CA certificate bundle in PEM format
|
Path to CA certificate bundle in PEM format
|
||||||
.TP
|
.TP
|
||||||
|
@ -579,6 +579,10 @@ int Downloader::listGames()
|
|||||||
}
|
}
|
||||||
std::cout << userdata << std::endl;
|
std::cout << userdata << std::endl;
|
||||||
}
|
}
|
||||||
|
else if (Globals::globalConfig.iListFormat == GlobalConstants::LIST_FORMAT_WISHLIST)
|
||||||
|
{
|
||||||
|
this->showWishlist();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this->games.empty()) {
|
if (this->games.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user