It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
What exactly is --download-file? Is there a way to download only a specific file from inside the Linux installer?

I basically want to extract information on what the current build id / version the Linux installer has, to detect if there are updates pending vs my current installation.
Post edited November 15, 2024 by shmerl
97bb4d8 Galaxy: Select build by build id
Make it possible to select by build id
Tries to find build with build id first
If no build is found with specified build id then try to use it as build index
If build id or index is not valid then default to build index 0

d83ba7f Add option to select network interface for operations
Adds option --interface

8dce7a3 Change --wishlist into --list option
Remove --wishlist
Add --list wishlist

avatar
shmerl: What exactly is --download-file? Is there a way to download only a specific file from inside the Linux installer?

I basically want to extract information on what the current build id / version the Linux installer has, to detect if there are updates pending vs my current installation.
--download-file was made to download files using their id
It was made so lgogdownloader could be used with the old gogdownloader:// links or as a download agent for other tools that want to download specific installers/extras
for example using as download agent for makepkg on Arch Linux

Example: downloading soundtrack for Tyrian 2000
Get the file id you want from --list details output

$ lgogdownloader --list details --game tyrian_2000
gamename: tyrian_2000
product id: 1207658901
title: Tyrian 2000
icon: https://images-4.gog-statics.com/203248e9b6f1d89007fde05ad6e30ce4ba10be7a58579df54662c61e3d92f36c.png
installers:
id: en1installer0
name: Tyrian 2000
path: /tyrian_2000/setup_tyrian_2000_3.01_(76355).exe
size: 17825792
updated: False
language: English
version: 3.01

extras:
id: 9543
name: soundtrack
path: /tyrian_2000/extras/tyrian2000_ost.zip
size: 132120576
$ lgogdownloader --download-file tyrian_2000/9543
or
$ lgogdownloader --download-file 1207658901/9543


There isn't an option to do version comparison when using Mojosetup files as Galaxy depot for Linux installers at the moment.
The mojosetup hack is kinda dumb currently and doesn't try to check version numbers in any way and instead just always updates the installed files if there are differences found in the installer.
Not really sure how much work it is going to be to add all the logic needed for that since I haven't looked at that code in a while.
I'll have to look into it some more.
avatar
Sude: There isn't an option to do version comparison when using Mojosetup files as Galaxy depot for Linux installers at the moment.
The mojosetup hack is kinda dumb currently and doesn't try to check version numbers in any way and instead just always updates the installed files if there are differences found in the installer.
Not really sure how much work it is going to be to add all the logic needed for that since I haven't looked at that code in a while.
I'll have to look into it some more.
I see. The way to hack around that is to use gameinfo or game/goggame-<id>.info files that exists in Linux installers and extract versions / build information from there. That's what I wanted to do in my script at least, but to do that it needs an ability to download only one specific file from inside the installer.

UPDATE:

Actually using --list details shows the version! Thanks for the tip:

lgogdownloader --list details --platform l --game drova
...
gamename: drova_forsaken_kin
product id: 1254250206
title: Drova - Forsaken Kin
icon: https://images-1.gog-statics.com/5c7c8507bde7278261729ccb1d187a75c330eeebf34f0514e26266541522f11a.png
installers:
id: en3installer0
name: Drova - Forsaken Kin
path: /drova_forsaken_kin/drova_forsaken_kin_1_0_6_77800.sh
size: 1306525696
updated: False
language: English
version: 1.0.6

So I can detect that version has changed using my own script since I can extract the version from those files in the alredy installed game. That would make triggering the update more sensible.

UDPATE 2:

Hm, is there some way to get game name using game id? Because --list details works with names, but my script works with game ids.

For now I can hardcode it.

UDPDATE 3:

Actually, linux updating with "pseudo-Galaxy" using the installers isn't so dumb - if files are up to date, it's not downloading them.
Post edited November 17, 2024 by shmerl
I noticed an interesting pattern in updating behavior.

If file is added to a blacklist, then lgogdownloader treats it as an orphan and deletes it (when running with deleting orphans). The only way to prevent that is to add it also to the ignorelist at the same time.

This helps the case of locally modified file that you want to be left untouched.

If the file is only is the ignorelist though (and not in blacklist), it will be overwritten by the file from the server if they differ. That's a bit counter-intuitive. May be the locally modifed file that's not really an orphan should not be replaced if it's in the ignorelist?
Post edited November 29, 2024 by shmerl
avatar
shmerl: I noticed an interesting pattern in updating behavior.

If file is added to a blacklist, then lgogdownloader treats it as an orphan and deletes it (when running with deleting orphans). The only way to prevent that is to add it also to the ignorelist at the same time.

This helps the case of locally modified file that you want to be left untouched.
This should have been fixed by
cc44c35 Don't consider blacklisted files to be orphaned
b37dafb Galaxy: Don't consider blacklisted files to be orphaned

avatar
shmerl: If the file is only is the ignorelist though (and not in blacklist), it will be overwritten by the file from the server if they differ. That's a bit counter-intuitive. May be the locally modifed file that's not really an orphan should not be replaced if it's in the ignorelist?
The idea behind ignorelist was initially to just work with orphan check so I could have it ignore any additional files (mostly mods) I store with the game files but it indeed works a bit counter-intuitive.
And with the the above changes to how blacklist works it kind of becomes irrelevant since one can just add files to be ignored into blacklist and have it work the same way as if they are ignorelisted.
I'll have to think about what to do about ignorelist. Maybe I'll even remove the option since blacklist can be used for the same purpose.
Post edited November 29, 2024 by Sude
avatar
Sude: This should have been fixed by
cc44c35 Don't consider blacklisted files to be orphaned
b37dafb Galaxy: Don't consider blacklisted files to be orphaned
Ah, I see thanks - good to know! I have the version from the Debian repo which didn't get that change yet since it's not in the tagged version. I can apply that patch manually for now.

avatar
Sude: I'll have to think about what to do about ignorelist. Maybe I'll even remove the option since blacklist can be used for the same purpose.
Yeah, I'm using ignorelist for mods now too. If one option will handle both - I guess it simplifies things.
Post edited November 29, 2024 by shmerl
LGOGDownloader 3.16
- Fixed item url when showing wishlist
- Made downloader to not consider blacklisted files to be orphaned
- Made --galaxy-* options able to select build with build id
* Tries to find build with build id first
* If no build is found with specified build id then try to use it as build index
* Defaults to build index 0 if build id or index is not valid
- Changed --wishlist into --list option
* Removed --wishlist
* Added --list wishlist
- Added option to select network interface for operations
* --interface
- Updated man page
- Improved completed file skipping for extras
- Galaxy: Added small files container support
* Instead of downloading a lot of very small files we download a file that contains all the small files and extract it when everything is downloaded
- Galaxy: Added option to convert file path to lowercase for Windows game files
* --galaxy-lowercase-path
* Some games for Windows have inconsistent casing in their file path
* With this we don't end up with multiple directories because different capitalization makes them unique on case-sensitive filesystems

https://github.com/Sude-/lgogdownloader/releases/download/v3.16/lgogdownloader-3.16.tar.gz

sha256: 24b005bf3caf00ebc8c603251f5689d66098f66dd37bdf399836289064cb0c9f
md5: 1b81e283d4cb289aa501c77d9c3c0c3d
avatar
Sude: LGOGDownloader 3.16
- Fixed item url when showing wishlist
- Made downloader to not consider blacklisted files to be orphaned
- Made --galaxy-* options able to select build with build id
* Tries to find build with build id first
* If no build is found with specified build id then try to use it as build index
* Defaults to build index 0 if build id or index is not valid
- Changed --wishlist into --list option
* Removed --wishlist
* Added --list wishlist
- Added option to select network interface for operations
* --interface
- Updated man page
- Improved completed file skipping for extras
- Galaxy: Added small files container support
* Instead of downloading a lot of very small files we download a file that contains all the small files and extract it when everything is downloaded
- Galaxy: Added option to convert file path to lowercase for Windows game files
* --galaxy-lowercase-path
* Some games for Windows have inconsistent casing in their file path
* With this we don't end up with multiple directories because different capitalization makes them unique on case-sensitive filesystems
Neat, thanks for the updates! Would it be possible to also add ability to pull info from "--list details" using the build id, not name match?

And another optimization could be using worker threads for individual chunks when downloading a huge file since it drops to using just one thread per file, even if that file is huge.

For example with Stalker 2 some individual files are like 30+ GB and they end up being the single file pulled with one thread after everything else finished which is suboptimal.

I.e. instead of assigning worker threads per file, you could assign worker threads for the whole pool of chunks in some fashion, this way things will get downloaded at even speed.
Post edited December 23, 2024 by shmerl
I'm using 3.16 for the first time and got this error:

```
lgogdownloader --login
... that was fine
lgogdownloader --download
Getting game names (11/11) 26 / 26
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Failed to parse json: * Line 1, Column 1
Syntax error: value, object or array expected.
Getting game info 1026 / 1026
Total size: 4.12 TB
```

After this games start downloading but I wanted to report the issue.
Fantastic utility and very thorough documentation. Many Thanks!
Switched all my ignorelist config entries to blacklist ones and and it all works nicely for mods both for extra and existing modified files, thanks!
Post edited 5 hours ago by shmerl
I have been getting a weird bug(maybe, could be that thing were you are doing something stupid but can't see it until someone points it out), --check-orphans and --delete-orphans are detecting most files as orphans even for games that were just downloaded, i tried --check-orphans after i downloaded the games that --delete-orphans deleted and they were all detected again.
Attachments: