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
If multiple threads detected that directory didn't exist at the same time and tried to create it then one thread would succeed in creating it first and other threads would be trying to create a directory that already exists.
boost::filesystem::create_directories() would then return false for those threads and skip the file download.
Having additional check to see if the directory exists after boost::filesystem::create_directories() returns false fixes the problem.
Changed message queue to use the new "Message" class.
Simplifies status message printing by having the message class take care of formatting and keeping track of the message type.
Status messages are now timestamped and colored based on message type
I would like to use LGOGDownloader in conjunction with Gentoo's
package manager, which may execute it as root, portage, or some other
user in the portage group. A shared configuration under /etc will be
used to avoid sandboxing issues. This will not be world readable.
Adds options to set path to CA certificate bundle in PEM format.
CURL_CA_BUNDLE environment variable is used if it is set and CA certificate path is not set with --cacert option.
Some GOG XML data files contain additional nodes/elements that were not handled properly and caused issues.
We only care about the "chunk" elements so lets ignore all other xml elements.