Commit Graph

444 Commits

Author SHA1 Message Date
Sude
8191b9d0a3 Galaxy: Workaround for file name issue 2017-10-18 13:19:25 +03:00
Sude
3f8a8d6b68 Galaxy: Remove duplicate code
Removed duplicate code by unifying various *JsonNodeToGameFileVector functions
2017-10-18 13:13:35 +03:00
Sude
257946dbc1 Workaround for crash with older version of jsoncpp 2017-10-12 00:29:04 +03:00
Sude
b0a90f6c60 Galaxy: Use en-US locale for product info 2017-10-12 00:23:15 +03:00
Sude
eee162177f Galaxy: Fix getting file name (again)
GOG changed the url formatting in "downlink" json response again.
Check which format is in use and select proper method for the format.
2017-10-10 16:53:07 +03:00
Sude
79aa66a2d3 Galaxy: Fix getting file name
GOG changed part of the API which caused lgogdownloader to not get valid file name.
Change galaxyAPI::installerJsonNodeToGameFileVector and galaxyAPI::extraJsonNodeToGameFileVector to get proper file name.
2017-10-10 10:12:18 +03:00
Sude
6c2a3b4392 Save Galaxy tokens in destructor 2017-09-20 07:01:43 +03:00
Sude
257b6b0137 Update login check 2017-09-20 06:59:43 +03:00
Sude
edc6486637 Update login function
Downloader::login will fail if Galaxy API login is not successful.
Exporting cookies no longer works because Galaxy API login is tied to website login.
2017-09-20 06:08:45 +03:00
Sude
2d70bdfacb Galaxy: Add DLC info to game details only if DLC has any files 2017-09-15 13:06:02 +03:00
Sude
fd27b93486 Check and refresh Galaxy login before using Galaxy API handle 2017-09-15 03:11:03 +03:00
Sude
c9b6ea4a52 Galaxy: Add some checks to GalaxyConfig class
Check that json contains the node before trying to get value
2017-09-15 02:17:44 +03:00
Sude
706158d595 Get game details using Galaxy API
Game details are now acquired using Galaxy API.
Allow using most features without valid downloader API login by changing Downloader::isLoggedIn to return false only if website is not logged in.
--download-file still uses old API and will not work without valid API login. Downloader::downloadFileWithId prints error message and exits if user doesn't have valid API login.
Game details cache version is incremented because of changes to gameFile class.
Show product id for DLCs when using --list-details option.
Rewrote Downloader::repair to remove duplicated code.
Fixed serials containing <br> tags.
2017-09-13 16:46:46 +03:00
Sude
6f42fec671 Reset the value for chunk retry limit
Forgot to reset the value in 709235613f
2017-09-01 08:20:05 +03:00
Sude
709235613f Add retry limit for failed chunk repairs
If repairing a chunk failed then the downloader could get stuck in infinite loop trying to repair the chunk.
This fixes the issue by adding a retry limit for failed chunk repairs.
2017-09-01 08:08:33 +03:00
Sude
ac602f8188 Merge https://github.com/0-wiz-0/lgogdownloader 2017-08-29 13:14:54 +03:00
Thomas Klausner
da9afb175f cmake: use GNUInstallDirs for easier packaging. 2017-08-29 11:52:40 +02:00
Sude
638590ccfd Update man page
Remove old information about platform support.
2017-08-19 14:01:48 +03: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
a9e61b00ba API: Unescape file paths
Some file paths returned by the API are url encoded.
Use curl_easy_unescape to url decode all file paths returned by the API.
2017-07-07 16:26:33 +03:00
Sude
3fb05682c6 Fix help text for --subdir-installers 2017-06-07 11:53:10 +03:00
Sude
6b8d5ff744 Preserve timestamps
Get timestamps from server for all downloaded files and set the last modified date to that.
Should also change timestamps for previously downloaded files when using single or multi threaded mode.
Retroactively changing timestamps doesn't work for files downloaded with --galaxy-install because Downloader::galaxyInstallGame doesn't try to download the file if it already exists and is the same file as on server.
2017-06-07 11:22:42 +03: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
66c1d6d51e Add language: Spanish (Latin American) 2017-05-23 12:33:47 +03:00
Sude
6c6cad4048 Add language: Ukrainian 2017-05-16 17:36:00 +03:00
Sude
8f55f3aa7a Update url for login check 2017-04-28 19:21:19 +03:00
Sude
1f7d559bfa Version 3.2 2017-03-07 07:32:13 +02:00
Sude
d4a6791e65 Galaxy: Add option to select language 2017-03-06 07:22:34 +02:00
Sude
8cbc62b8cd Galaxy: Fix downloading DLC files
Add product id from depot JSON to galaxyDepotItem struct

Previously downloader failed to download DLC files because DLCs have different product id than base game
Fix downloading DLC files by setting product id for each depot item
2017-03-06 06:58:11 +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
d4294b6d12 Galaxy: Use install directory from json
Use install directory value from json as subdirectory in directory specified by --directory
If install directory was not set then use product id as subdirectory
2017-03-05 22:05:08 +02:00
Sude
d2249ffdc5 Build Galaxy download url according to format specified in json 2017-03-05 21:52:05 +02:00
Sude
602cac8b4c Add resume support to Downloader::galaxyInstallGame 2017-03-04 23:52:29 +02:00
Sude
d6d3d3a40e Fix some issues with GalaxyConfig
Fix compile error: "conversion from ‘time_t {aka long int}’ to ‘const Json::Value’ is ambiguous"
Add checks for missing "expires_in" value in Galaxy tokens json
2017-02-27 22:24:56 +02:00
Sude
2b9c7f9273 Update README.md 2017-02-17 12:11:04 +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
Sude
22f47de4fc Fix crash in Website::getGames
JSON value for updates can be null in some cases. For example when user owns a dlc but not the base game.
This caused a crash due to std::stoi throwing std::invalid_argument exception
2017-01-20 00:15:50 +02:00
Sude
1d1855049c Version 3.1 2017-01-13 18:19:34 +02:00
Sude
ff8ac41fde Add missing include to util.h 2017-01-13 18:09:05 +02:00
Sude
b9bb37b36a Make --list show number of updates for games that have been updated
Allows user to check for updated games more easily
2017-01-11 19:22:38 +02:00
Sude
6d6a676e0a Add function Util::formattedString
Replace all "printf" and "sprintf" calls using Util::formattedString
2017-01-11 15:57:26 +02:00
Sude
e045612ab8 Rewrite Downloader::checkStatus
Added type for DLCs to gameFile (GFTYPE_DLC)
Added gameDetails::getGameFileVector function
Simplified Downloader::checkStatus code by removing duplicate code
Downloader::checkStatus now also tries to get remote file hash for patches and language packs
2016-12-20 22:29:56 +02:00
Sude
9f214d9652 Limit download thread count to number of items in download queue 2016-12-18 18:25:24 +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
f93c8ee753 Merge branch 'detectTerminal' of https://github.com/chanceVermilion/lgogdownloader 2016-12-11 14:45:38 +02:00
Sude
159dfecfb2 Merge branch 'curl-nosignal' of https://github.com/pkerling/lgogdownloader 2016-12-11 14:44:34 +02:00