Commit Graph

46 Commits

Author SHA1 Message Date
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
8e55b81ca1 Galaxy: Extend subdir option to work with MojoSetup hack
Extends subdir option introduced in 1b3b04b28c to work with Downloader::galaxyInstallGame_MojoSetupHack
2018-09-12 16:02:34 +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
3b733fcb4b Galaxy: Set timestamp for downloaded file 2018-05-29 11:23:51 +03:00
Sude
463a9c386e Galaxy: Add hack for installing Linux games
Try to use Linux installers as replacement for Galaxy repository.
Linux installers use MojoSetup which means that the installers are Zip files that have bash script and installer binary prepended.
We can get zip file entries from zip central directory and then split the game installer to chunks based on those file entries.
Therefore we can download individual files from the installer.
2018-05-29 08:56:29 +03:00
Sude
ef1a344610 Remove cover download support 2018-05-14 11:12:10 +03:00
Sude
e9ac6d072f Galaxy: Make --galaxy-install multithreaded 2018-02-12 18:46:17 +02:00
Sude
672e6f8207 Galaxy: Check for orphaned files
Check and list orphaned files after download/installation with --galaxy-install is finished
2017-05-23 16:53:24 +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
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
Sude
dea82b7991 Some code restructuring
- Move some code from Downloader::init() to constructor
- Add function API::isLoggedIn()
- Add function Downloader::isLoggedIn()
- Don't call Downloader::getGameList() from Downloader::init(). Call it from other functions if/when needed

Also fix some login issues
2016-12-17 21:01:44 +02:00
Sude
9842c070e4 Multithreaded getGameDetails
Get game details using multiple threads
2016-11-15 19:30:32 +02:00
James Le Cuirot
1388c00a4e
Exit with non-zero status when --list or --list-details fails 2016-09-23 22:20:37 +01:00
James Le Cuirot
d8b8d6da96
Exit with non-zero status when at least one --download-file fails 2016-09-23 22:20:08 +01:00
Sude
442fad04db Add support for parallel downloads
New option "--threads" can be used to set how many parallel downloads to run. The default is 4 threads.

Changes to behavior:
- Serials and changelogs are saved and covers downloaded for all games that match the "--game" filter before any other files are downloaded.
- Automatic XML creation is run after all files are downloaded. Previously xml data was automatically created right after download finished.
- The "--limit-rate" option sets rate limit for thread not global rate limit.
2016-05-20 20:33:07 +03:00
Sude
112ad17e18 Drop support for libcurl < 7.32.0 2016-05-03 16:48:54 +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
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
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
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
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
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
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
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
5102f812a4 Make sure that large file support is enabled on 32 bit systems 2014-08-01 20:32:29 +03:00
Sude
31c547be8a Fix saving config when init fails but --login was not used 2014-07-07 15:57:07 +03:00
Sude
50cc5a2565 Added DLC support 2014-03-29 01:51:39 +02:00
Sude
c70a6c3775 Save xml data to subdirectories
$XDG_CACHE_HOME/lgogdownloader/xml/gamename/filename.xml
Fixes problem with some games using same filenames for extras
2014-02-26 15:04:16 +02:00
Sude
f671834068 Retry failed/partially downloaded files
Added --retries option to set maximum number of retries
2014-02-26 14:59:23 +02:00
Sude
cfe4311209 Save to log after each file instead of waiting until destructor is called 2014-02-13 11:16:31 +02:00
Sude
9dda0fccdc Added --report option 2014-02-13 10:05:16 +02:00
Sude
1238f54143 Remove environment check because it's not used for anything 2014-01-05 16:04:23 +02:00
Sude
0d9c27d20a Added --status command and made createXML output easier to read
Version check before download now works without local XML data. However it is much slower without the XML data because it calculates MD5 for the files

Some changes to config.h
- Removed "bHelp" from config because it was not needed
- Changed "bNoColor" to "bColor"
- Changed "bNoUnicode" to "bUnicode"
2013-11-14 15:40:59 +02:00
Sude
f2794ededf Added --check-orphans to check for orphaned files
Checks for orphaned files (files found on local filesystem that are not found on GOG servers) and prints their path
2013-10-14 22:31:12 +03:00
Sude
2a253f6357 Get details about game extras from account page 2013-10-13 11:55:46 +03:00
Sude
d4db79e783 Added version detection before resuming download
Tries to detect if remote file is different from local file before resuming
Remote XML data is saved when download is started
2013-04-08 13:43:11 +03:00
Sude
55134979fb Update the url for WTFPL license 2013-03-24 23:56:57 +02:00
Sude
e2253ebeca Partially revert "Add language to installer path if it is missing"
Reverts some changes from 97e948abb4.

Revert automatically adding the language code to filename:
http://gog.com/forum/general/introducing_the_beta_release_of_the_new_gogcom_downloader/post1483
Keep language in gameFile class because it may be useful later.
2013-03-24 00:23:40 +02:00
Sude
97e948abb4 Add language to installer path if it is missing 2013-03-23 15:42:09 +02:00
Sude
2d045c4052 Initial commit 2013-03-15 22:46:16 +02:00