Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when extracting recent addons since Workshop update #4

Open
HavannaFR opened this issue Jun 15, 2022 · 9 comments
Open

Error when extracting recent addons since Workshop update #4

HavannaFR opened this issue Jun 15, 2022 · 9 comments

Comments

@HavannaFR
Copy link

Hello,

There is an issue that has been around for quite a while that I haven't taken the time to report, since the Workshop update for Garry's Mod (https://store.steampowered.com/news/app/4000/view/3334287173839084094) it is impossible to extract recent addons but only old ones.

The error (example) :

Page de codes active : 65001
Downloading (Improved Prop Interact) to ./temp/ds_2818729885.gma
Traceback (most recent call last):
File "gmaddown_console.py", line 130, in
urllib.request.urlretrieve(item["file_url"], file_savename)
File "urllib\request.py", line 187, in urlretrieve
File "urllib\request.py", line 162, in urlopen
File "urllib\request.py", line 450, in open
File "urllib\request.py", line 268, in init
File "urllib\request.py", line 294, in full_url
File "urllib\request.py", line 323, in _parse
ValueError: unknown url type: ''

Thanks !

@magnusjjj
Copy link
Owner

Hi! I forgot to answer this one!

Yes, it seems like they completely switched API's, which is both frustrating and good since the old one was.. well, a flaming pile of garbage, to be absolutely frank.

Do you have some addons you want me to try it with, while I develop? :)

@HavannaFR
Copy link
Author

Hello ! Thank you for your answer ! Normally I believe that all recent addons do not work but if you want an example there is for example those there :
https://steamcommunity.com/sharedfiles/filedetails/?id=2811906809
https://steamcommunity.com/sharedfiles/filedetails/?id=2804031522
https://steamcommunity.com/sharedfiles/filedetails/?id=2804024904

Thanks ! :)

@magnusjjj
Copy link
Owner

I managed to download the addons anonymously with steamcmd.

I also talked with a bunch of developers, and I used fiddler to see if I couldn't eek out how steamcmd does it.

Problem is that they seem to have moved over (or never used anything but) to a custom, obfuscated websocket thing for download location resolution. That.. isn't great, and certainly isn't reliable.

What I am going to do instead is just write a wrapper around steamcmd that does the same thing. Will take up more file space, not happy about it, and is going to be somewhere after next week that I can start working at it.

In the meantime, if you download steamcmd, you can run:
login anonymous
workshop_download_item 4000 (your id number here)
and it will download the addon and tell you where it sticks it.
You can then use gmad.exe from your garrys mod directory to extract the addon.

It's a bit of a bother, but at least it doesn't install the addon to your main steam installation but is self contained in its own directory.

@HavannaFR
Copy link
Author

Oops, I completely forgot to answer...
Your idea to redo your tool around SteamCMD is a very good idea, it doesn't matter if this one takes more space :)

Thanks for your help !

@magnusjjj
Copy link
Owner

I have made the tiniest of proof of concepts that downloads the gmad file, tomorrow I will do extraction. It's a windows program now..

image

So, uh. My brain is fried from the heat. So feature requests, I guess, is something to ask for? Right now it just sticks them wherever steamcmd downloads them to. Before, they extracted to named folders.
Are you interested in fastdl directory generation, or is it just quick dirty copy paste -> extract time? :)

@HavannaFR
Copy link
Author

Wow that's beautiful! I look forward !

Personally I just wish I could extract addons from the workshop easily and quickly, but one feature I would really like is being able to download several addons at once :)

I think it would be nice to work with the addon ID and just have to put a space between each ID to download several addons at the same time!

At the directory level, I think it doesn't matter where the .gma lands what matters is the files extracted from the gma, it would be nice if the final folder was in the same place as your .exe!

@magnusjjj
Copy link
Owner

magnusjjj commented Jul 1, 2022

  • Add gmad extractions
  • Query valves's servers to figure out the name of the addon being downloaded so it is actually possible to figure out which of all these folders the files landed in without looking at the logs
  • Button to get to the right directory quickly
  • Workshop collection downloading
  • Handle old style extractions as well? Just lzma extraction, just gotta find an old style gma in the first place :')
  • User testing

@magnusjjj
Copy link
Owner

OK, so I have made a terrible hack of a thing, with pretty much zero error handling, but you stick the URL to an addon in the right field, hit go, and it downloads, extracts, and it automatically opens the folder where it extracted the things.

Do you have discord or similar so we can chat while testing? :)

@HavannaFR
Copy link
Author

OK, so I have made a terrible hack of a thing, with pretty much zero error handling, but you stick the URL to an addon in the right field, hit go, and it downloads, extracts, and it automatically opens the folder where it extracted the things.

Do you have discord or similar so we can chat while testing? :)

Oops I had a lot of work at the moment and I completely forgot, sorry! Here is my Discord: Havanna ElLama#1998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants