timppu: 1. What are "languagepacks"? Do they refer to the game installer in different languages, or something else?
Some games have separate language pack installers which you can download and install to get extra language options.
For example Witcher 3 has multiple language packs (German, French, Portuguese-Brazilian, Polish, Russian and Japanese). To list all language packs for Witcher 3 you can use:
lgogdownloader --list-details --language all --include languagepacks --game witcher_3
timppu: 2. What are the common commands to run in order to keep a clean and up-to-date collection?
To keep clean and up-to-date collection you can use
lgogdownloader --download --check-orphans
to download everything and list orphaned files and then do what you want to orphaned files.
Orphan check outputs the file paths for orphaned files so you can just copy/paste those file paths to a document to keep track of them, paste them to a program to mass delete or move them, etc.
You can also use "lgogdownloader --status" to check status of currently existing files.
--status Show status of files
Output format:
statuscode gamename filename filesize filehash
Status codes:
OK - File is OK
ND - File is not downloaded
MD5 - MD5 mismatch, different version
FS - File size mismatch, incomplete download
As an example here's what it outputs for me when I check status for Beneath a Steel Sky
$ lgogdownloader --status --platform all --language all --game beneath_a_steel_sky
Getting game names (2/2) 38 / 38
Getting game info 1 / 1
OK beneath_a_steel_sky setup_beneath_a_steel_sky_1.0_(20270).exe 91327544 9c136a1b34d759bc8fb748eca732f092
ND beneath_a_steel_sky beneath_a_steel_sky_2.0.0.16.dmg
OK beneath_a_steel_sky beneath_a_steel_sky_en_gog_2_20150.sh 105864419 5cc68247b61ba31e37e842fd04409d98
ND beneath_a_steel_sky beneath_a_steel_sky_french_2.0.0.16.dmg
ND beneath_a_steel_sky beneath_a_steel_sky_italian_2.0.0.16.dmg
ND beneath_a_steel_sky beneath_a_steel_sky_german_2.0.0.16.dmg
ND beneath_a_steel_sky beneath_a_steel_sky_spanish_2.0.0.16.dmg
OK beneath_a_steel_sky bass_manual.zip 125311 20380c6ee39791ef126e8f82338b6d85
OK beneath_a_steel_sky bass_security_manual.zip 6256215 1fe6133108ec0efc548594bd6ae9b25c
OK beneath_a_steel_sky bass_wallpapers.zip 5331651 020d9e45974c90f7a980dec12f5e405f
OK beneath_a_steel_sky bass_avatars.zip 264808 543a32578a2c7d0b64b9da2f9206cc83
OK beneath_a_steel_sky bass_comic_book.zip 12407867 1364b8d8d7051eed1b7aeb87741aecc3
timppu: lgogdownloader --login (is this needed only the first time, or every time you want to use lgogdownloader?)
--login is only needed the first time or if your login has expired
timppu: lgogdownloader --check-orphans (does this delete all obsolete files, or move them somewhere, or just report which such files there are?)
--check-orphans just lists all files the downloader thinks are orphaned.
It uses regex to determine which files it is interested in.
The default regex is '.*\.(zip|exe|bin|dmg|old|deb|tar\.gz|pkg|sh)$' which should include all file extensions that GOG uses (zip, exe, bin, sh, dmg) or used previously (deb, tar.gz, pkg) and "old".
".old" file extension is used by lgogdownloader when it moves a file because new version with same filename is encountered.
I wrote a patch long time ago that made --check-orphans delete orphaned files but I never merged it and I'm not sure if it still applies correctly to current version of downloader.
timppu: lgogdownloader --repair (what does this mean in practice? Check the file integrity against the md5 checksums, and redownload those files which don't pass the check? How does it check e.g. the extras (as they don't have md5 checksums, I believe)?
--repair checks the file integrity against the md5 checksums in xml data.
If a file chunk fails integrity check then it tries to repair it by downloading that specific file chunk.
For extras it relies on checksum data that the downloader creates for them after it finishes downloading them if automatic xml creation is enabled (--create-xml "automatic" or --automatic-xml-creation)
It's a hack to get around the issue of GOG not providing checksum data for extras.
Because the data isn't provided by GOG --repair is not 100% accurate for extras but gets the job done.
For example if GOG updates the extra and it has same file name and size then it's possible that lgogdownloader fails to download the new file or uses old xml data on new file and thinks that the new file is corrupted when actually the xml data is wrong.
There are some differences to how automatic xml creation works depending on whether the downloader is working in multithreaded mode (default) or single threaded mode (forced by using --repair --download, because repair mode is single threaded)
When running the downloader in multithreaded mode it adds all successfully downloaded extras (libcurl returns CURLE_OK) to queue to wait until all downloads have finished and then creates xml data for all files in the queue.
When running the downloader in single threaded mode it creates the xml data right after successfully downloading the file.