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
Currently any execution of lgogdownloader touches $HOME, even if the
user only requested help or the version number. This fixes main() to
handle --help and --version before doing anything to the filesystem.
This also helps some build environments where $HOME is undefined
(e.g. the Debian build platform).
Signed-off-by: Stephen Kitt <steve@sk2.org>
Configuration files and cookies are now stored in "$XDG_CONFIG_HOME/lgogdownloader"
if $XDG_CONFIG_HOME is not set it will use "$HOME/.config/lgogdownloader"
XML files are now stored in "$XDG_CACHE_HOME/lgogdownloader/xml"
if $XDG_CACHE_HOME is not set it will use "$HOME/.cache/lgogdownloader/xml"
API::getGameDetails now has a parameter to enable duplicate handling (default: false)
The duplicate handler applies a language id flag on the original installer so it shows support for multiple languages
Downloader uses duplicate handler by default
Added --no-duplicate-handling option to disable duplicate handler
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"