Commit Graph

180 Commits

Author SHA1 Message Date
Sude
c9198d672d Added option to list game details as JSON
Removed --list-details option
Added --list-format to select a format that --list uses

"no_details" is the same as --list previously and the default value
"details" is the same as --list-details was previously
"json" is JSON formatted output
2023-03-13 22:25:33 +02:00
David Donátek
4fcb3bceb7 Slightly nicer libcurl cleanup 2023-01-01 04:55:46 +01:00
David Donátek
ed41fbef6f Revert "Fix core dump with libcurl >= 7.87.0"
This reverts commit 6ce6aeb1dc.
2023-01-01 04:50:09 +01:00
Sude
6ce6aeb1dc Fix core dump with libcurl >= 7.87.0
Relying on automatic object allocation caused curl_global_cleanup() to be called before destructor cleaned up curl handles causing segfault.
Use dynamic object allocation and delete objects before calling curl_global_cleanup() so destructor is executed before global cleanup.
2022-12-28 00:17:19 +02:00
Sude
e5d347d5b2 Add option to set message verbosity level
Replaced --verbose option with --verbosity to better control message verbosity
2022-12-16 13:35:37 +02:00
loki-47-6F-64
f8852e9ad5 Add the abillity to delete cloud saves 2022-08-04 23:55:18 +02:00
loki-47-6F-64
6870330eab Add the abillity to force upload/download of cloud saves even if up-to-date 2022-08-04 23:27:04 +02:00
loki-47-6F-64
4ff846e5cd Add a whitelist and blacklist for cloud saves 2022-08-04 23:04:37 +02:00
loki-47-6F-64
33ec0434aa Upload local saves to the cloud 2022-08-04 16:57:15 +02:00
loki-47-6F-64
829d263bc7 Show local cloud save files 2022-08-03 14:53:45 +02:00
loki-47-6F-64
c97a828aa7 Download cloud save files 2022-08-02 18:36:31 +02:00
loki-47-6F-64
c4f604aec0 Show cloud save paths 2022-07-31 14:11:32 +02:00
loki-47-6F-64
8e046e977d Rudimentary support for showing location of local saves for cloud saves 2022-07-28 21:11:44 +02:00
Sude
983592d09e Reduce the amount of request to cdn with --galaxy-install
Should fix the issue of getting temporarily blocked by GOG cdn when installing game with lots of small files
2022-02-17 10:30:38 +02:00
Sude
695916af4c Add support for tags
Adds basic support for filtering games using tags that the user can set on account page
Add option --list-tags to list all the tags user has assigned
Add option --tag to filter games using the tags
2021-11-09 14:59:42 +02:00
Dmitry Khalanskiy
554de90f46 Add a flag to avoid hash checks 2021-09-12 10:25:37 +03:00
Sude
f69747bb88 Remove support for OpenSSL <= 1.0.2
Removes openssl thread locking callbacks required by OpenSSL <= 1.0.2
Other SSL libraries and newer OpenSSL should be handled by libcurl in a way that is thread-safe
2021-09-09 14:18:17 +03:00
Sude
521eea8522 Ignore SIGPIPE
It's possible to receive SIGPIPE sometimes which by default causes application to terminate.
This makes the downloader ignore SIGPIPE.
2021-09-09 14:03:51 +03:00
Sude
70d2fdbefc Add option --use-dlc-list
Adds new option --use-dlc-list to enable using DLC list.
Previously the downloader used DLC list by default which made getting game details very slow for not much benefit.
This makes the downloader not use DLC list by default and thus getting game details is much faster.

Before and after result of listing games with 212 game collection using "time lgogdownloader --list"

Before
real    0m36,135s
user    0m0,159s
sys     0m0,039s

After
real    0m2,226s
user    0m0,048s
sys     0m0,019s
2021-08-26 13:26:13 +03:00
Sude
4e09d6357e Add directory template %gamename_firstletter%
Feature request by "coffeecup" on GOG forums
Useful for sorting big libraries with --subdir-game option
Takes the first letter from %gamename%
If %gamename% begins with a number then 0 (zero) is used instead
2021-08-06 11:46:07 +03:00
Sude
04592d512a Don't change globalConfig.bLogin value in Downloader::isLoggedIn 2021-03-31 15:39:18 +03:00
Sude
0a7648d80b Use separate thread count option for info threads
Adds --info-threads option to set number of threads the downloader uses for getting product info
2020-02-17 19:33:15 +02:00
Sude
8829f44e37 Remove dependency on liboauth
liboauth is no longer needed.
Removed references to oauth token and secret from code.
I forgot to remove these in 42c71884a2
2019-11-14 18:57:37 +02:00
Sude
42c71884a2 Remove old GOG downloader API
Removed all remaining code related to old API.
Removed dead or commented out code that I noticed while checking the code for references to old API.
2019-11-14 18:25:12 +02:00
Sude
bcccec416f Galaxy: Add option to delete orphaned files 2019-06-06 20:00:38 +03:00
Sude
86bb528c39 Add regex support to --galaxy-install and --galaxy-show-builds
Check if option value is regex and then ask user to select one product from a list of products matching the regex.
2019-04-22 18:14:53 +03:00
Sude
8540955af8 Reverse previous behavior of GUI login being enabled by default
Adds option --enable-login-gui which is used to enable GUI login when reCAPTCHA is encountered on login form.
This reverses the previous behavior added in ea0ec2a9bd and removes --disable-login-gui option.
It's better to have GUI login disabled by default just in case user is running lgogdownloader through SSH without X forwarding.
Because user has to enable login GUI first there won't be any unexpected behavior.
2019-04-22 18:01:19 +03:00
Sude
ea0ec2a9bd Add option to disable GUI login
Adds option --disable-login-gui which is used to disable GUI login when reCAPTCHA is encountered on login form.
Useful when downloader is compiled with GUI support but user is using it through SSH without X forwarding.
2019-03-01 23:12:04 +02:00
nathanel23
f65599e216 Fix for memory corruption/crash related to rhash
This patch fixes issues with some calls to the rhash C library that
cause subtle memory corruptions. There are two main issues that this
patch addresses:

1) The library init function is called multiple times in various places
within in the Util class. This is not necessary and may cause issues
if the initialization is repeated simultaneously in multiple threads.
Therefore the call was moved to the beginning of the main() function.

2) There is not enough space in the output buffers to store the
terminating NUL character of the hex-formatted hashes. The print
function from the rhash library writes a regular C string to
the output buffer and expects enough space to include the end
marker.

Depending on the memory layout generated by the compiler, this results
in one byte of the stack to be overwritten, which might lead to random
issues that are hard to find. On AArch64 (ARM) with GCC 6.3 the call to
the rhash_print() function happens to destroy the lower byte of the
frame pointer and causes a crash due to an invalid free() operation some
time after the Util::createXML function returned.
2019-01-06 01:06:23 +01:00
Sude
df628b2a59 Add option to include hidden products
Adds option --include-hidden-products that allows user to list and download products that have been set hidden in account page.
2018-12-20 13:10:27 +02:00
Sude
ab84d6f827 Galaxy: Add option to set CDN priority
--galaxy-cdn-priority option allows to set priorities for content delivery networks
2018-09-12 20:07:59 +03:00
Sude
1b3b04b28c Galaxy: Add option to set subdirectory for installation
New option --subdir-galaxy-install allows user to set installation subdirectory when using --galaxy-install
2018-09-12 15:18:54 +03:00
Sude
05e9409d52 Add separate option to set libcurl to verbose mode
New --curl-verbose option is used to set libcurl to verbose mode.
Old --verbose option is still used to print more information but no longer sets libcurl to verbose mode.
2018-09-05 17:51:03 +03:00
Sude
35b178e674 Galaxy: Add support for downloading dependencies
Adds support for downloading dependencies for a game
Added --galaxy-no-dependencies option to disable downloading dependencies during --galaxy-install
2018-09-05 17:41:43 +03:00
Sude
cae5f80698 Allow saving empty option values to config
Fixes issues caused by boost program options overriding desired value with default value because it wasn't found in config file.

For example using --subdir-extras "" --save-config would erase subdir-extras from config file.
Trying to download something would then cause the downloader to use default value for subdir-extras because it wasn't found in config.
2018-08-23 21:30:24 +03:00
Sude
8e9c094929 Replace --update-check option and remove --game aliases
Replace --update-check option with --updated and --notifications options
--updated restricts downloader to operate only on games that have update flag set in account page
--notifications shows the number of new forum replies, updates games, unread chat messages and pending friend requests
--clear-update-flags clears update notification flags for all games

Remove aliases for --game option
"free" could no longer be used as originally intended and "all" was unnecessary because leaving regex empty has the same effect
2018-07-21 23:59:08 +03:00
Sude
9dc5d4124c Add OS and arch to default user agent 2018-07-01 22:51:32 +03:00
Sude
04370b8b53 Better help text for galaxy-install and galaxy-show-builds 2018-05-14 11:38:56 +03:00
Sude
c6e5214910 Remove numeric option values from help text 2018-05-14 11:25:52 +03:00
Sude
ef1a344610 Remove cover download support 2018-05-14 11:12:10 +03:00
Sude
90dcaf0106 Add options to set low speed timeout values for libcurl 2017-11-08 15:20:03 +02:00
Sude
8a71c63b20 Add option to set interval for progress bar update 2017-08-18 09:33:10 +03:00
Sude
4f8843312c Expose galaxy options as experimental options in help text 2017-08-18 09:19:48 +03:00
Sude
35192fd725 Add option to set user agent 2017-08-01 23:59:11 +03:00
Sude
3fb05682c6 Fix help text for --subdir-installers 2017-06-07 11:53:10 +03:00
Sude
29e5febab0 Galaxy: Support selecting platform architecture
Add option --galaxy-arch to select architecture.
Supports selecting platform architecture when "osBitness" is set for depot.
If "osBitness" is not set in API response then assume that we want to download the files from depot.
2017-05-23 16:44:27 +03:00
Sude
d4a6791e65 Galaxy: Add option to select language 2017-03-06 07:22:34 +02:00
Sude
f5af312fd4 Add option to set login info on command line or read it from file
Add --login-email and --login-password to set login info on command line

Read login info from $XDG_CONFIG_HOME/lgogdownloader/login.txt if the file exists
login.txt must contain email on the first line and password on the second line
2017-03-06 05:46:48 +02:00
Sude
f9981c1be0 Galaxy: Add option to select platform 2017-03-05 22:47:44 +02:00
Sude
f2e8dde934 Some initial Galaxy code
Add some code for initial Galaxy support.
Rewrite and move code around in preparation for GOG Galaxy API support.
2017-02-17 11:14:28 +02:00