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

×
avatar
ssokolow: The new --cover option breaks my convenience solution for shell aliasing because it seems to provide no way to set cover=true and then override that in the few shell aliases which are the excepton to the rule.

(Instead, I have to write a shell function which checks for existing covers, backs them up if present, runs lgogdownloader, deletes newly-downloaded covers, and then restores any backups it may have made.)
avatar
Sude: 369e8bb Add --no-cover option back
Thanks. when do you get around to re-architecting things, it'd probably be a good idea to mimic various other Unixy tools and set up the option parser to make every boolean option have a no- counterpart.

Ideally, allowing them to appear multiple times on the command line with later occurrences overriding earlier ones. That simplifies scripts and frontends because they don't have to reinvent the understanding of which options override which other ones.

For example:
alias gogd="lgogdownloader --foo --bar --baz"
gogd --no-foo ...
Post edited September 05, 2014 by ssokolow
avatar
Loenas: lgogdownloader doesn't download the surgeon simulator DLC for me.
In the game card it's listed as
https://www.gog.com/downlink/surgeon_simulator_anniversary_edition/en1installer1
while the game itself is listed as
https://www.gog.com/downlink/surgeon_simulator_2013/en1installer1
so perhaps the changing path is a problem?
avatar
Sude: The different name shouldn't matter.
Actually the downloader expects DLC to have different name:
https://github.com/Sude-/lgogdownloader/blob/master/src/downloader.cpp#L2022-L2040

Does the game have DLC counter on the game shelf? (div with class="shelf-game-dlc-counter")
Does the DLC link div have "data-gameindex" attribute?
https://www.gog.com/upload/forum/2014/09/da25e106d9f946ca4f98e48056fb3477bebf2cfe.jpg
There is no DLC counter on the game shelf. (first attachment)

There is a data-gameindex attribute.
I've expanded the main download and the DLC download from the HTML DOM. I hope this helps (second attachment)

One other thing:
I can't download the new witcher 2 19GB Linux file with lgogdownloader, it just doesn't do it.

I'm using:

lgogdownloader --check-orphans --download --repair --create-xml automatic --no-subdirectories --language=524287 --platform=7 --game witcher
Attachments:
Post edited September 05, 2014 by Loenas
HTTP: Login successful
API: Login failed

:(
Post edited September 05, 2014 by Baemir
avatar
Loenas: There is no DLC counter on the game shelf. (first attachment)
This is where is fails. The downloader expects every game that has DLC to have the DLC counter so it doesn't need to spend lots of time getting info about every game from the account page.
https://github.com/Sude-/lgogdownloader/blob/master/src/downloader.cpp#L1982
This could be fixed by getting info for all games from the account page but it would make Downloader::getGames() much slower

Does the API response (json from debug info of API::getGameDetails) for Surgeon Simulator include info about the DLC?

I could make an exceptions list of games that have DLC but don't have the DLC counter but that would need constant updates.
It would be best if GOG added DLC counter to it.
avatar
Loenas: One other thing:
I can't download the new witcher 2 19GB Linux file with lgogdownloader, it just doesn't do it.

I'm using:

lgogdownloader --check-orphans --download --repair --create-xml automatic --no-subdirectories --language=524287 --platform=7 --game witcher
This is caused by the --repair option which fails because it can't get the XML data
The API response says that there is XML data available but the data doesn't exists and thus it fails with 404 error
I reported this issue here and also sent a message to GOG support about it.

edit: this isn't an ideal solution but as a workaround before GOG adds the XML data you can download
https://sites.google.com/site/gogdownloader/gog_the_witcher_2_assassins_of_kings_1.0.0.3.tar.gz.xml
to $XDG_CACHE_HOME/lgogdownloader/xml/the_witcher_2/ and then use --no-remote-xml
Post edited September 06, 2014 by Sude
I installed lgogdownloader following the instruction in the OP, thanks! I got a couple of test downloads with success and now I need to work my way through downloading the rest of my library. What I'd like to know is: does the lgogdownloader automatically verify the files for integrity once downloading is finished or do I need to check them manually?

For the test downloads I used the line:
lgogdownloader --status --game game_name --directory /media/my_username/"my partition"/GOG/
and it states 'OK' for each of the files so it all looks good. Should I do this check for every game (with extras) downloaded?
Post edited September 06, 2014 by IanM
avatar
IanM: I installed lgogdownloader following the instruction in the OP, thanks! I got a couple of test downloads with success and now I need to work my way through downloading the rest of my library. What I'd like to know is: does the lgogdownloader automatically verify the files for integrity once downloading is finished or do I need to check them manually?

For the test downloads I used the line:

lgogdownloader --status --game game_name --directory /media/my_username/"my partition"/GOG/
avatar
IanM: and it states 'OK' for each of the files so it all looks good. Should I do this check for every game (with extras) downloaded?
It doesn't verify the files after downloading. The downloader assumes that everything is OK if download finishes with CURLE_OK.

--status checks the hash from remote XML against hash from locally saved XML data
If no locally saved XML data is found then it calculates md5 of the file and compares it to the remote XML
This makes --status fairly fast but it assumes that nothing went wrong during the download or that nothing has corrupted after the download.

--repair is much better for making sure everything is OK as it always hashes the file and compares the chunk hashes to chunk hashes from remote XML data. This also allows it to repair only corrupted chunks.
However --repair takes much longer time because it requires hashing all the files.

--repair is better for checking integrity
--status is more useful for checking if you're missing anything or if something has updated
Both depend on XML data being available. This isn't a problem for installers and patches as GOG provides XML data for them. However extras require you to have saved the XML data with --create-xml because GOG doesn't provide XML data for extras.
avatar
Sude: It doesn't...
Thanks! I'll check again using the --repair command

I didn't change anything when I started downloading, rather than redownload the extras can I make the XML now or is it only possible to create the XML when initiating a download? EDIT: my attempts to guess a command to make the XML failed. Please excuse my lack of certainty on this, I rarely use the Terminal so I feel like I'm guessing most of the time...

On an unrelated note: when I started the download for Fallout it fetched the info for 3 games, does this mean it's about to download Fallout 2 and Tactics as well? EDIT: indeed, --download fallout does get the series, so if one wants to download only the first game is there a way to do that e.g. download "fallout" with the quotation marks?
Post edited September 06, 2014 by IanM
avatar
IanM: I didn't change anything when I started downloading, rather than redownload the extras can I make the XML now or is it only possible to create the XML when initiating a download? EDIT: my attempts to guess a command to make the XML failed. Please excuse my lack of certainty on this, I rarely use the Terminal so I feel like I'm guessing most of the time...
You could use "--create-xml automatic" but it only works if the download finishes with CURLE_OK so it won't work for resume attempt of already finished downloads as libcurl returns CURLE_RANGE_ERROR

You can also use "--create-xml /path/to/file" to create XML data for specific file.
However the downloader doesn't know what game the XML data belongs to so you'll need to move the XML data to proper subdirectory in ~/.cache/lgogdownloader/xml/ or specify the directory with "--xml-directory ~/.cache/lgogdownloader/xml/gamename/ --create-xml /path/to/file"

There's some code changes here that allow the downloader to create XML even on resume attempts. I'll probably add something similar to git version later

avatar
IanM: On an unrelated note: when I started the download for Fallout it fetched the info for 3 games, does this mean it's about to download Fallout 2 and Tactics as well? EDIT: indeed, --download fallout does get the series, so if one wants to download only the first game is there a way to do that e.g. download "fallout" with the quotation marks?
The downloader uses partial matching so it downloads everything that contains "fallout" in it (it's basically the same as regular expression ".*fallout.*"). You want to use exact matching. You can use exact matching by putting it between '^' and '$'
--game "^fallout$"
avatar
Sude: You could use "--create-xml automatic" but...
...You can use exact matching by putting it between '^' and '$'
--game "^fallout$"
Thank you once again, I'd add +10 to your posts if I was able to!

I have the next game downloading now with the --create-xml automatic command added. I will go back to the others at a later time and see if I specify the XMLs manually.

^...$ is ideal, I think it will be useful on a few more so that I can make sure I don't go over my bandwidth limits. On the subject on bandwidth limits, is it possible to download a few specific games together? e.g. I want Syberia + Arx Fatalis + Sanitarium. Would the command be:
lgogdownloader download --game ^syberia$ arx_fatalis sanitarium
or something else?
avatar
IanM: On the subject on bandwidth limits, is it possible to download a few specific games together? e.g. I want Syberia + Arx Fatalis + Sanitarium. Would the command be:

lgogdownloader download --game ^syberia$ arx_fatalis sanitarium
avatar
IanM: or something else?
lgogdownloader --download --game "^(syberia|arx_fatalis|sanitarium)$"
or
lgogdownloader --download --game "^syberia$|^arx_fatalis$|^sanitarium$"
both should give the same result

edit: you can see which games will be downloaded by using it on the list
lgogdownloader --list --game "^(syberia|arx_fatalis|sanitarium)$"
Post edited September 06, 2014 by Sude
I can't log in any more, all I get is:

Failed to get login token
HTTP: Login failed

I take it that this is on their end as my log in details are definitely correct and it didn't used to be a problem. In fact I haven't tried downloading things in a couple weeks, so I shouldn't be blocked or anything like that.

I wonder if this means that Galaxy is imminent. I would assume they'd like to have it out in time for TW3 and WL2.
I've been downloading almost non stop for the last 2-3 days, I've got one game 45 min from finishing and another queued up to start immediately after, so we'll see if the next one is halted... EDIT: downloads continued as they should, I'll see if I am still logged in when it's all done.

I notice my library is still sorted by purchase date after I checked stuff earlier, before now lgogdownloader forces the sort order to alphabetical frequently (I assume every time it starts a new file or something)
Post edited September 08, 2014 by IanM
I'm currently putting this through its paces by getting it to download my library. Seems to work alright so far.

I'm curious though.. does the API give you file sizes? It would be helpful/interesting to be able to be able to do a --du before downloading to make sure I have enough room for --download.
Hmmm... No longer working for me after update. "lgogdownloader --login" now returns "No games were found on your account. Try --login to refresh your authorization."
Then, it asks for Email anyway, followed by password, which returns: "Failed to get login token HTTP: Login failed"
What am I doing wrong?

edit:
And even though login appears to fail, --update-check tells me that I have 3 updated games which agrees with the website. Yet, --list returns ""No games were found on your account. Try --login to refresh your authorization."
Post edited September 10, 2014 by pmn357
cba5fb9 Make Downloader::HTTP_Login print some more info

avatar
hedwards: I can't log in any more, all I get is:

Failed to get login token
HTTP: Login failed
avatar
pmn357: Hmmm... No longer working for me after update. "lgogdownloader --login" now returns "No games were found on your account. Try --login to refresh your authorization."
Then, it asks for Email anyway, followed by password, which returns: "Failed to get login token HTTP: Login failed"
What am I doing wrong?
Try debug build of the current git version.
It will print a little more info during login.

avatar
pmn357: edit:
And even though login appears to fail, --update-check tells me that I have 3 updated games which agrees with the website. Yet, --list returns ""No games were found on your account. Try --login to refresh your authorization."
The reason that --update-check works while --list fails is that --update-check only uses the API. Your API login details are still valid but the website cookies are not valid or there's some other error preventing the downloader getting list of games.

avatar
xyem: I'm curious though.. does the API give you file sizes? It would be helpful/interesting to be able to be able to do a --du before downloading to make sure I have enough room for --download.
It does give file sizes. Extras don't currently have filesizes because at one point GOG removed extras from the API response for some reason so extras are now parsed from account page. I haven't made code to parse the filesize from the account page yet.