Commit Graph

99 Commits

Author SHA1 Message Date
Sude
037582d3b1 Progressbar: add function to get bar as string 2016-04-27 20:47:15 +03:00
Sude
7b1127a85e Use CURLOPT_XFERINFOFUNCTION instead of obsolete CURLOPT_PROGRESSFUNCTION
CURLOPT_XFERINFOFUNCTION was introduced in libcurl 7.32.0
Newer libcurl prefers the new callback even if both CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION are set. Therefore we can still support older versions libcurl.
2016-04-25 19:26:02 +03:00
Sude
51026efec0 Fix issue with cache update
Fixes an issue caused by 33fb004cdd
Website handle didn't have updated config which caused overridden values to be ignored
2016-04-25 18:20:00 +03:00
Sude
5bfb00bb31 Changed gameFile format and gamedetails cache format
gameFile now contains gamename and file type info
Game details cache format has been changed to match gameFile changes
Cache also has a new "gamedetails-cache-version" field that can be used to detect cache format changes
2016-04-25 18:14:04 +03:00
Sude
2538825fb2 Add missing WTFPL license text to gameDetails and gameFile classes 2016-04-18 20:39:31 +03:00
Sude
33fb004cdd Move GOG website related members of Downloader class to new Website class
Downloader::HTTP_Login --> Website::Login
Downloader::getGames --> Website::getGames
Downloader::getFreeGames --> Website::getFreeGames
Downloader::getGameDetailsJSON --> Website::getGameDetailsJSON
Getting wishlist details is split from Downloader::showWishlist to Website::getWishlistItems function
2016-04-18 20:33:19 +03:00
Sude
987e053ad4 Add option to save changelogs 2016-03-06 15:45:22 +02:00
Sude
852cb563ba Reduce the amount HTTP requests
Save game details json for later use when DLC info is downloaded in Downloader::getGames.
This reduces the amount of HTTP requests because we don't need to download the info again in Downloader::getGameDetails.
2016-03-06 14:02:30 +02: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
f786e94970 Remove excess semicolon warnings 2016-02-20 14:55:52 -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
3465384e0b Use include/exclude options to select what to download/list/repair
The default is "--include all --exclude covers"
2015-10-07 11:52:04 +03:00
Sude
82aa604b3e Add language: Slovak 2015-10-06 15:44:36 +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
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
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
f51cca5dff Add options to login separately to website and API 2015-08-12 16:42:54 +03: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
9fbf791a78 Fixed createXML declaration. 2015-07-04 20:52:12 +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
Sude
2c02435157 Use correct language code for Brazilian Portuguese 2015-06-17 06:12:19 +03:00
Sude
cd5b79b3c9 Add support for Brazilian Portuguese 2015-06-15 04:26:51 +03:00
Sude
6d1c05294d Set language and platform constants by using left shift
Makes the code easier to understand
2015-06-15 04:23:43 +03: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
29e6b6290c Add option to show wishlist 2015-05-13 17:13:30 +03:00
Sude
b5cdf10078 Support new account page layout 2015-05-12 02:19:16 +03:00
Sude
21e6c6119d Make progressbar display 10 second average download speed 2015-04-27 16:51:17 +03:00
Sude
d97849818e Add option to download files using file id 2015-04-11 16:42:10 +03:00
Sude
3834c1e612 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
2015-03-28 12:52:41 +02:00
Sude
216cfaedfe Add support for saving serial numbers 2015-03-19 09:50:50 +02:00
Sude
f039db5c65 Change jsoncpp include path 2015-01-22 09:22:48 +02:00
Sude
d04cfbae1f Make progress bar adapt to terminal width 2014-11-27 23:20:22 +02:00
Sude
cb2395b0ba Make config and cookie files only readable/writable by current user 2014-10-28 21:03:02 +02:00
Gael Le Mignot
a46fad588b First working version of priority handling 2014-10-26 10:47:13 +01:00
Gael Le Mignot
1204ea247e Preparation work on priority mode: config file parsing, documentation. 2014-10-25 17:57:04 +02:00
Sude
9235ee8b4a Add support for caching game details
Helps with large libraries when running the downloader multiple times.
Getting game details for many games takes a long time. Caching the game details makes the process much faster for subsequent runs.

Game details are cached to "$XDG_CACHE_HOME/lgogdownloader/gamedetails.json"
--update-cache creates and updates the cache.
--use-cache enables loading game details from cache.
--cache-valid specifies how long cached game details are considered valid
2014-10-16 11:05:57 +03:00
Sude
5635909e20 Add support for setting subdirectories
Allows user to specify subdirectories for games, installers, extras, patches, language packs and dlc
2014-09-19 22:46:03 +03:00
Sude
810506b74b Create filepaths in gameDetails class
Add makeFilepaths method to gameDetails class
Add setFilepath and getFilepath methods to gameFile class
2014-09-19 21:08:46 +03:00
Sude
7a00b59345 Move gameFile and gameDetails classes to their own files 2014-09-19 20:23:21 +03:00
Sude
7a15a93676 Change --report option to allow setting the filename of report 2014-09-17 12:41:01 +03:00