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.
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.
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.
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.
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.
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
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
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
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
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
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
- 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
If we print shorter progress text than we printed earlier then characters from the earlier string would remain on the terminal because the line was not cleared.
Clear the line before printing to avoid the extra characters.
Ignore DLC count information for specific games by using a list of games that we know have DLC.
GOG reports wrong DLC count information for many games. By using a list of games that we know have DLC we can ignore DLC count info that GOG provides for those games.
User can use local list ($XDG_CONFIG_HOME/lgogdownloader/game_has_dlc.txt) or use remote list by using the new "--dlc-list" option.
The list uses same format as blacklist.
Properly fixes the skipped file downloads due to race condition caused by trying create same directory from multiple threads at the same time.
4c480465b3 fixed the issue by having additional check to see if the directory exists after boost::filesystem::create_directories() returned false.
This fix uses mutex to make sure only one thread at a time can check if the directory exists and create it