417 Commits

Author SHA1 Message Date
Sude
173481a6f6 Make --update-cache ignore dlc count information 2016-03-06 13:20:04 +02:00
Sude
ca97148827 Make sure that file exists before trying to automatically create xml data in Downloader::getLocalFileHash 2016-02-29 03:15:53 +02:00
Sude
21555b19f3 Fix --subdir-patches option
Forgot to set default subdirectory for patches in 4d4aaa1792c52b665235e7c1f0538f8cc63d6981
2016-02-24 01:58:03 +02:00
Thomas J. Moore
f29cf99431 Automatically create XML files (MD5sum cache) for manually downloaded
files during status check if automatic creation enabled.
2016-02-20 15:01:00 -06:00
Thomas J. Moore
9520f3f3b7 Improvements to orphan detection:
- blacklist applies to installed files only; use ignorelist for orphans
  - blacklisted but present items are orphans, as they should be
  - use exact matching for file paths: files in wrong location are orphans
2016-02-20 14:59:52 -06:00
Thomas J. Moore
d9697ea988 Apply blacklist to status checker to avoid some spurious ND messages 2016-02-20 14:57:34 -06:00
Thomas J. Moore
c0735d5993 Use cerr for password prompts, error messages, rolling status
messages, and other stuff that shouldn't clutter saved stdout.
Probably needs more work.
2016-02-20 14:56:44 -06:00
Sude
0de2a9f64b Add support for priority in game specific language and platform options 2016-02-20 15:34:51 +02:00
Sude
4d4aaa1792 Improve game specific config options
"platform" and "language" options allow using string to set them.
This allows user to set them more easily without needing to calculate the sum of integer values and makes the config easier to understand later.
For example: this allows setting "language" to English, German and French with "en+de+fr" which is much easier to understand than setting it to "7".

Directory options can be overridden using game specific config file
New options in game specific config file:
 - "subdirectories" - <bool>
 - "directory" - <string>
 - "subdir-game" - <string>
 - "subdir-installers" - <string>
 - "subdir-extras" - <string>
 - "subdir-patches" - <string>
 - "subdir-language-packs" - <string>
 - "subdir-dlc" - <string>
2016-02-15 14:27:29 +02:00
Sude
fc88679b12 Add option to set automatic XML creation in config file 2016-02-04 11:51:11 +02:00
Sude
ddbb5d07cc Fix priority handling for DLCs 2015-10-03 19:52:19 +03:00
Sude
d648d3a073 Add Util::getOptionNameString to reduce some duplicate code 2015-10-03 19:03:24 +03:00
Sude
ba27e4fbcc Add version string and number to cached game details 2015-10-03 19:00:51 +03:00
Stephen Kitt
574a315c44 Check that stdin is a tty before reading
If stdin isn't a tty, the behaviour of std::getline(std::cin, email) and getpass() is different (the latter always uses /dev/tty). If input is redirected, it's probably best to just fail.
2015-09-13 15:15:21 +02:00
Sude
16b14d091b Simplify "all" value calculation to make it easier to understand
No idea why I was shifting 2 instead of 1 here.
2015-09-03 12:42:00 +03:00
Sude
d8c66707cc Fix retry on timeout
Don't delete the file on timeout
2015-09-02 16:11:03 +03:00
Sude
b4fd9fcf5c Use regular expressions for getting language and platform option values
Selecting languages with --language and --language-priority
- Whatever code GOG happens to use in their API (mostly ISO 639-1)
- ISO 639-1
- ISO 639-2/T
- ISO 639-2/B
- English name

Selecting platforms with --platform and --platform-priority
- Windows: "w, win, windows"
- Linux: "l, lin, linux"
- Mac: "m, mac, osx"
2015-09-02 11:16:00 +03:00
Sude
2206e988a6 Initial support for using platform/language strings to set options 2015-09-01 14:45:34 +03:00
Sude
9b560d786e Some minor code cleanup 2015-09-01 13:59:54 +03:00
Sude
887ac52563 Some improvements to priority handling
Fixes issues with some strings that caused issues previously
For example: 4,,1 is now handled correctly
2015-08-29 16:18:20 +03:00
Sude
a8e09a7f48 Use same structure for language and platform structs 2015-08-29 15:03:20 +03:00
Sude
2473b6f24d Remove tarball specific code from API 2015-08-29 14:31:59 +03:00
Sude
06d211f534 Simplify and remove duplicate code for getting config directory paths 2015-08-29 14:26:36 +03:00
Sude
b6d07f5343 Merge branch 'outname' of https://github.com/bwrsandman/lgogdownloader 2015-08-15 07:56:53 +03:00
Sandy Carter
bc92655702 Add output filename option
Add -o option to specify path and downloaded file name when using
--download-file
Overrides --directory
2015-08-14 23:15:15 -04:00
Sandy Carter
fe314869c1 Factor out protol string as a constant 2015-08-14 21:09:27 -04:00
Sude
ceef80167c Add support to ignore dlc count using game specific config with --list 2015-08-12 17:01:15 +03:00
Sude
64cae133cf Change path to look for game specific config files
Old path: $XDG_CONFIG_HOME/lgogdownloader/gamename.conf
New path: $XDG_CONFIG_HOME/lgogdownloader/gamespecific/gamename.conf
2015-08-12 16:53:25 +03:00
Sude
374453b806 Detect reCAPTCHA on login form 2015-08-12 16:47:17 +03:00
Sude
f51cca5dff Add options to login separately to website and API 2015-08-12 16:42:54 +03:00
Sude
9db2b8f2b0 Use getFormattedErrorMessages instead of deprecated getFormatedErrorMessages 2015-07-06 06:59:54 +03:00
Sude
6e5a0870e8 Delete old cookies when using --login 2015-07-06 06:47:09 +03:00
Erik Fleischer
fb23318d5a Fix --repair on 32 bit platforms for files > 2 GB. 2015-07-05 19:23:11 +02:00
Erik Fleischer
7e8f707846 Fixed segmentation fault on startup on 32 bit platforms.
Fixed downloading files > 2GB on 32 bit systems.
2015-07-05 15:50:16 +02:00
Erik Fleischer
0d73445e28 Some more small changes to handle files > 2GB on 32bit platforms. 2015-07-04 20:22:08 +02:00
Erik Fleischer
23df30d7be Continued replacing size_t with uintmax_t in order to handle file larger than 2GB on 32 bit platforms. 2015-07-03 22:09:50 +02:00
Erik Fleischer
095492942e Replaced size_t with uintmax_t for file size data types. 2015-07-02 18:27:28 +02:00
Sude
3f7fbc5bd1 Show DLC gamename instead of base gamename in --status output for DLCs 2015-07-02 03:04:04 +03:00
Sude
64690d0368 Add status code for file size mismatch 2015-07-02 03:01:21 +03:00
Sude
84e8ab8dab Tell user to try --login if JSON parsing fails in Downloader::getGames 2015-07-01 04:03:27 +03:00
Sude
699c9f29a5 Show the real filesize with --status on incomplete downloads 2015-07-01 04:01:18 +03:00
Sude
c4c2f8cb6d Use std::stoull instead of std::stoi in Downloader::checkStatus 2015-06-29 23:48:55 +03:00
Sude
59faa40b4b Check for incomplete download when using --status
Fixes issue with --status when remote xml data is already downloaded but the download was incomplete
Downloader::getLocalFileHash returned the same file hash as Downloader::getRemoteFileHash which caused --status to report it as OK
2015-06-29 23:00:22 +03:00
Sude
de301d7e8c Better handling of connection issues
Assume that we have connection error and abort transfer with CURLE_OPERATION_TIMEDOUT if download speed is less than 200 B/s for 30 seconds
2015-06-28 07:38:39 +03:00
Sude
c722283022 Move game filtering from Downloader::getGameList to Downloader::getGames 2015-06-21 17:20:53 +03:00
Petr Běhan
3de1c8332e better startup time when using --game regex
... especially when using generic --ignore-dlc-count='.*'

previously, lgogdownloader would fetch game details for every game
that indicated that it has DLCs. Which were all of them when used with
--ignore-dlc-count - potentialy hundreds of http queries and cause of very slow
startup with larger accounts. Regardless of what --game regex said.

After the change, only initial list of all games is fetched, and then details
for games that both the user is interested in AND they are suspected of
having DLC. So it should help with startup time even when user doesn't use
--ignore-dlc-count option.
2015-06-04 16:25:21 +02:00
Sude
834e6baa7a Add options to ignore DLC count information
Ignoring DLC count information helps in situations where the account page doesn't provide accurate information about DLCs.
--ignore-dlc-count sets regular expression filter for games to ignore DLC count information.
Game specific option "ignore-dlc-count" can be used to ignore DLC count for specific game.
2015-06-01 10:45:30 +03:00
Sude
584b953bd7 Skip extras without filename 2015-05-31 19:07:21 +03:00
Sude
0230a3517d Make Downloader::repairFile create new XML data on filesize mismatch 2015-05-30 12:42:10 +03:00
Sude
e8a8b1dd5f Fix error with login when cookies don't exist but API login works 2015-05-17 18:53:47 +03:00