Thanks, Adjuntor, for reminding me to post this. If anyone is interested, I am lazily keeping a set of lgogdownloader patches on my own
misc game support project instead of trying to get any of it pushed upstream. I blame the COVID-19 panic keeping me away from the Internet, mostly. Patches include:
don't change the shelf search order when updating the cache
ignore SIGPIPE during cache updates (not sure why I felt the need to do that any more)
only write changelogs if they change
and ones I did specifically for the limited net access I referred to above:
make cache updates faster by skipping details updates in first pass and aborting 404 errors in second, as mentioned in my previous post on the subject
don't log in for check-orphans if using cache, and provide an as-yet-undocumented option to do an offline check of what would be downloaded
All these patches are in the
lgogdownloader subdirectory.
Maybe in a month or two, if/when this idiotic panic ends, I'll put more effort into it.
edit: a few notes about that last patch:
First, it moves code around from the changelog patch, so that needs to be applied first.
The reason I wanted offline check-orphans is because it doesn't need to be on-line, and sometimes I forgot to run it while i'm on-line, and I have way too many games so my storage space is running low and I have to delete orphans before downloaning.
The reason for the offline download check is to prevent the need to redownload the XML and/or run a test download for every single file like normal on-line downloader does. I can use the new feature in three ways:
To just get an idea of what will be downloaded:
lgogdownloader --quick-download-check --exclude=p,c 2>/dev/null
When I have my USB drive that holds my downloaded games plugged in, to skip games that probably don't need downloads: I can still do a full download when all it's probably going to do is checks later.
lgogdownloader --download --exclude=p,c --game=$(lgogdownloader --quick-download-check --exclude=p,c 2>/dev/null | cut -d/ -f5 | sort -u | tr '\n' \| | sed -e 's/|$//')
But, since I do this on my laptop with no power, I prefer not to have the USB drive plugged in, and use my internal storage instead. So, off-line, I copy the affected game dirs over to the internal drive, do my downloads on the internal drive, and copy them back when done. This, and the cut command in the above snippet, relies on my root download directory being /mnt/usb3f/gog (the gog dir on drive connected to the front USB3 connector) When the drive is unmounted, I have a soft link in that dir to /mnt/gog, which is on the local drive.
# with the USB drive mounted, copy game dirs to be updated
for x in $(lgogdownloader --quick-download-check --exclude=p,c 2>/dev/null | cut -d/ -f5 | sort -u); do rsync -avH /mnt/{usb3f/,}gog/$x/; done
# to actually download, without the USB drive mounted (using only 1 thread for better reliability)
ls /mnt/usb3f/gog >/tmp/.ls$$; g=; while read x; do g="$g|$x"; done </tmp/.ls$$; rm /tmp/.ls$$; lgogdownloader --download --exclude=p,c --threads=1 --game="^(${g#|})\$"
# to move the new downloads back to USB
rsync -avH /mnt/{,usb3f/}gog/
It'd be even better if I added an option to make the 2nd use case a matter of giving a command-line option. Also, the ETA should be adjusted to remove files that are likely complete.