magnusjjj / gmadget

A tool for getting steam workshop collections downloaded locally
9 stars 3 forks source link

Error when extracting recent addons since Workshop update #4

Open HavannaFR opened 2 years ago

HavannaFR commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago
magnusjjj commented 2 years ago

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 commented 2 years ago

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