- 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
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.
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.
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.
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
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"