Post attempt #3...
epain: I'd like LGOGDownloader to handle both accounts, match orphans with both accounts, etc.
No, it's not possible with just lgogdownloader. However, anything is possible with a few wrappers. Note that just swapping cookies.txt isn't enough. You have to swap the caches as well. I think storing the config/cache stuff in separate dirs is best.
For example:
Store individual account config in ~/.config/acct/<acct>/
Store individual account cache in ~/.cache/acct/<acct>/
You should link (hard or soft) all config files to be the same on both dirs except for cookies.txt. You should also soft link the xml subdirectory of the cache dirs together.
lgogdownloader repeatedly for all accounts (chmod +x and put in PATH)
---- lgogdownloader_ma ----
#!/bin/sh
for x in ~/.config/lgogdownloader/acct/*; do
XDG_CONFIG_HOME="$x" \
XDG_CACHE_HOME="$HOME/.cache/lgogdownloader/acct/${x##*/}" \
lgogdownloader "$@"
done
------------
The main issue I can't answer is how multi-factor authentication interacts with this. Would running "lgogdownloader_ma --login" allow you to log into both accounts, and remain logged in for long enough to do the rest of the work? I don't use MFA, so I don't know.
Downloading (files will not be downloaded twice, although sometimes the check takes so long it doesn't matter):
lgogdownloader_ma --download ....
Orphan checking (only works for 2*):
lgogdownloader_ma --check-orphans ... | sort | uniq -d
* if you need more than 2, replace "uniq -d" with something that can count higher than 2, such as:
(n=$(ls ~/.config/lgogdownloader/accts | wc -l)
l=zzz
while read -r x; do
test "$l" = "$x" || i=0
i=$((i+1)); l="$x"
test $i -eq $n && echo "$l"
done)
Note that I have done zero testing with this. Also, gog removes all indentation, but it's not 100% critical.