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

×
How do you download just one specific game?

It says on the site as an example: gogrepo.py download -id trine_2_complete_story

where do you get the id for a game? why doesnt it allow to download by name?

and how do you install this on windows?

why is there no simple working gog download client for Windows which has no disadvantage which doesnt need nonsense like php, python, docker or what else... cant someone make a simple one with a GUI too.

When I use this command I get this error:

D:\GOGOffline>python gogrepo.py update -os windows -lang en
16:09:51 | loading local manifest...
16:09:51 | fatal...
Traceback (most recent call last):
File "D:\GOGOffline\gogrepo.py", line 1166, in <module>
main(process_argv(sys.argv))
File "D:\GOGOffline\gogrepo.py", line 1141, in main
cmd_update(args.os, args.lang, args.skipknown, args.updateonly, args.id)
File "D:\GOGOffline\gogrepo.py", line 603, in cmd_update
gamesdb = load_manifest()
^^^^^^^^^^^^^^^
File "D:\GOGOffline\gogrepo.py", line 257, in load_manifest
with codecs.open(MANIFEST_FILENAME, 'rU', 'utf-8') as r:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen codecs>", line 906, in open
ValueError: invalid mode: 'rUb'
Post edited October 02, 2023 by makedir
avatar
makedir: why is there no simple working gog download client for Windows which has no disadvantage which doesnt need nonsense like php, python, docker or what else... cant someone make a simple one with a GUI too.
There is, check out gogcli.exe by Magnitus.

https://www.gog.com/forum/general/gogcli_gog_client

And if command-line is not your thing, then also my GUI program.

https://www.gog.com/forum/general/gogcli_gui_frontend_downloader_and_validator
avatar
makedir: How do you download just one specific game?

It says on the site as an example: gogrepo.py download -id trine_2_complete_story

where do you get the id for a game? why doesnt it allow to download by name?
It is downloading by name, which is the ID in this case, the slug version of it - trine_2_complete_story

Both gogrepo.py and gogcli.exe use a manifest, which stores data provided by GOG, that includes ID, Title, Slug, etc.
Post edited October 02, 2023 by Timboli
You will hardly find any program - especially web based ones - that don't need runtime libraries of any kind.
The reason? Because reinventing the wheel a hundred times helps no one.

Create some batch files for your stuff, to make it easier to use.
I have calls like

gog_update_changed
gog_update_single [gameslug]
gog_dl [gameslug]

gog_clearbatch
addgogid [gameslug]
gog_dl_batch
gog_dl_batch_everything

There are a few UIs that can do some of this for you, but I prefer working in a command line.
Reason: I log in to my download server from wherever I am *cough* work *cough*, start the download in background and log out again, letting it work while doing something else.
avatar
makedir: and how do you install this on windows?

why is there no simple working gog download client for Windows which has no disadvantage which doesnt need nonsense like php, python, docker or what else... cant someone make a simple one with a GUI too.
I specifically like the python-based gogrepo because it can run on pretty much any OS and device that understands python, not restricted only to Windows.

So i can run gogrepo in Windows PC, Linux PC, even my Raspberry Pi4 (a low-power ARM CPU computer running Linux) etc.

Yeah it takes a little bit effort on Windows as you need to install python and the needed modules first and then use text commands, but with good instructions anyone can do it easily.
Post edited October 02, 2023 by timppu
Just an observation:

I have run today a full update (2157 "games") and for the first time since February 2022, the entire update has passed without a single MD5 XML error. I'm guessing GOG might have finally addressed the issue.
avatar
neumi5694: You will hardly find any program - especially web based ones - that don't need runtime libraries of any kind.
The reason? Because reinventing the wheel a hundred times helps no one.

Create some batch files for your stuff, to make it easier to use.
I have calls like

gog_update_changed
gog_update_single [gameslug]
gog_dl [gameslug]

gog_clearbatch
addgogid [gameslug]
gog_dl_batch
gog_dl_batch_everything

There are a few UIs that can do some of this for you, but I prefer working in a command line.
Reason: I log in to my download server from wherever I am *cough* work *cough*, start the download in background and log out again, letting it work while doing something else.
please post those batch files. why does gogrepo need to update all games which takes hours. why is there no function to just download one game with a title, why is the manifest file it creates not user fiendly to read. why isnt there a command like gogrepo -search "witcher" and it gives back all the ids for the names. what is a slug?
avatar
makedir: please post those batch files. why does gogrepo need to update all games which takes hours. why is there no function to just download one game with a title, why is the manifest file it creates not user fiendly to read. why isnt there a command like gogrepo -search "witcher" and it gives back all the ids for the names. what is a slug?
It doesn't. You can also update single games, as described in the documentation.
In order to know what to download, gogrepo must have the download information for that game.

You can only update the information for that one game, then download that game.


Posting my files would not do you much good. They are not written in Bash (Linux), not in Batch (Windows/DOS).
Also I am also working with configuration files (for the file filter for example) and use one script for the common configuration that is called by others, trying to minimize redudancy. It makes it look more complicated of course.


If you replace the variables with real path names, this would update one game however:


${pythoncommand} ${gogrepodir}/${gogpyname} update -os windows -lang en de -id ${1//.../}


And this would download it, ignoring certain files if configured accordingly.

${pythoncommand} ${gogrepodir}/${gogpyname} download "$targetdir" -lang en de -skipextras -id ${1//.../} $skipfilesargument

The regex replacement at the end is because I am lazy. I copy/paste entries from the update log which always end with "..."
Just for the record GOGrepo defaults to downloading everything because it's primary purpose is maintaining an offline copy of your library so that DRM-free actually means something in the scenario where GOG goes under.

Everything else is effectively bonus features.
Any chance gogrepoc could download game details in parallel, similar to game data? There isn't much data to download, but the latency is extremely high.
avatar
nightstrike_gog: Any chance gogrepoc could download game details in parallel, similar to game data? There isn't much data to download, but the latency is extremely high.
Only to a limited extent, that delay is there to stop you getting detected as an attempted DoS. I'd have to futz around a fair bit to find an acceptable degree of parallelization and also leave a bit of overhead so that people with faster connections than me don't get temporarily banned.
avatar
Kalanyr: Just for the record GOGrepo defaults to downloading everything because it's primary purpose is maintaining an offline copy of your library so that DRM-free actually means something in the scenario where GOG goes under.

Everything else is effectively bonus features.
With 2400 games in my library I am very happy about these bonus features :)
avatar
makedir: please post those batch files.
Here are my batch files:

===============================
name: gr0.bat

contents:
python gogrepoc.py login -nolog

notes:
- used once to login to your account (or on rare occasions, to re-login)
===============================
name: gr1flag.bat

contents:
copy gog-manifest.dat gog-manifest-%date:~6,4%%date:~3,2%%date:~0,2%.bak
python gogrepoc.py update -resumemode noresume -skiphidden -os windows -lang en

notes:
- used to backup the manifest, then update it for games flagged by GOG as updated or as new (only Windows, English)
- assumes one's date format is dd/mm/yyyy (will need modification for other date formats)
===============================
name: gr1full.bat

contents:
copy gog-manifest.dat gog-manifest-%date:~6,4%%date:~3,2%%date:~0,2%.bak
python gogrepoc.py update -full -resumemode noresume -skiphidden -os windows -lang en

notes:
- used to backup the manifest, then update it for all one's games (only Windows, English), a.k.a. full update
- especially useful for games that GOG (by design) never flags as updated
- I run this about once a month, as it is very long (takes 4 hours for my 2000+ game library)
- assumes one's date format is dd/mm/yyyy (will need modification for other date formats)
===============================
name: gr1idid.bat

contents:
copy gog-manifest.dat gog-manifest-%date:~6,4%%date:~3,2%%date:~0,2%.bak
python gogrepoc.py update -resumemode noresume -skiphidden -os windows -lang en -ids %*

notes:
- used to backup the manifest, then update it for all the specific game or games listed (only Windows, English)
- to identify a specific game, I simply use the directory name that gogrepoc has assigned to it (a.k.a. its slug)
- assumes one's date format is dd/mm/yyyy (will need modification for other date formats)
===============================
name: gr2.bat

contents:
python gogrepoc.py clean I:\gog

notes:
- used to move old files to !orphaned before downloading the new ones
- assumes your games are stored under I:\gog (will need modification if stored elsewhere)
===============================
name: gr3.bat

contents:
python gogrepoc.py download I:\gog -os windows -lang en

notes:
- used to download new files, as identified by preceding update commands (only Windows, English)
- assumes your games are stored under I:\gog (will need modification if stored elsewhere)
===============================
name: gr4.bat

contents:
python gogrepoc.py verify I:\gog -clean -os windows -lang en

notes:
- used to verify newly downloaded files (only Windows, English)
- assumes your games are stored under I:\gog (will need modification if stored elsewhere)
===============================
name: grall_flag.bat

contents:
@echo off
call gr1flag.bat
pause
call gr2.bat
pause
call gr3.bat
pause
call gr4.bat

notes:
- this is the script I run whenever I see a new GOG update flag or whenever I buy a new game
===============================

recommended usage:

Initial one-time run (stages 1, 3, 4 will be very long):
- gr0.bat
- gr1full.bat
- gr2. bat
- gr3.bat
- gr4.bat

Every time one gets an update flag or buys a new game:
- grall_flag.bat

Once a month (stage 1 will be very long):
- gr1full.bat
- gr2. bat
- gr3.bat
- gr4.bat

On a need basis:
- gr1idid.bat [specific id or ids]
- gr2. bat
- gr3.bat
- gr4.bat
===============================

All the batch files are stored in and run from the same directory in which gogrepoc is located.

Feel free to ask for clarifications.
Post edited October 04, 2023 by mrkgnao
avatar
nightstrike_gog: Any chance gogrepoc could download game details in parallel, similar to game data? There isn't much data to download, but the latency is extremely high.
avatar
Kalanyr: Only to a limited extent, that delay is there to stop you getting detected as an attempted DoS. I'd have to futz around a fair bit to find an acceptable degree of parallelization and also leave a bit of overhead so that people with faster connections than me don't get temporarily banned.
Ah, so the latency is intentional vs a factor of creating many short lived connections. Understood.

Second request, can you add a command line option to disable posix_fallocate? When I run this in a particular cloud environment, that call fails in an obscure way that results in a hang instead of an exception. I solved it by commenting out the 4 calls. As a general code observation, those 4 calls are similar enough that you could also refactor a bit. But back to my use case, I don't think there's a benefit to preallocating in every environment, and certainly not when the syscall is broken :)
I had a sort of hiccup running gogrepoc yesterday: it didnt recognize some dlc's bought 2 weeks ago (atomicrops, dysmantle and Battlestar Galactica), and that i manually downloaded at the time and therefore orphaned them. Oddly, just the dlc's, not other games i bought at the same time. Also didnt recognize the game Sunblaze and orphaned it aswell.
Not a big issue, since i double check the orphaned folder before a permanent deletion.
avatar
darkangelz: I had a sort of hiccup running gogrepoc yesterday: it didnt recognize some dlc's bought 2 weeks ago (atomicrops, dysmantle and Battlestar Galactica), and that i manually downloaded at the time and therefore orphaned them. Oddly, just the dlc's, not other games i bought at the same time. Also didnt recognize the game Sunblaze and orphaned it aswell.
Not a big issue, since i double check the orphaned folder before a permanent deletion.
DLC purchases don't mark the base game as updated, you should manually update the corresponding game using -ids.
avatar
Kalanyr: Only to a limited extent, that delay is there to stop you getting detected as an attempted DoS. I'd have to futz around a fair bit to find an acceptable degree of parallelization and also leave a bit of overhead so that people with faster connections than me don't get temporarily banned.
avatar
nightstrike_gog: Ah, so the latency is intentional vs a factor of creating many short lived connections. Understood.

Second request, can you add a command line option to disable posix_fallocate? When I run this in a particular cloud environment, that call fails in an obscure way that results in a hang instead of an exception. I solved it by commenting out the 4 calls. As a general code observation, those 4 calls are similar enough that you could also refactor a bit. But back to my use case, I don't think there's a benefit to preallocating in every environment, and certainly not when the syscall is broken :)
Yes. Though the sys call hanging is extremely incorrect behaviour on somebody's part (hopefully the Python library because a broken Posix implementation on a cloud host is ... a tad worrying from a security perspective)
Post edited October 05, 2023 by Kalanyr