dizzyd / mcdex

Minecraft Modpack Management
Apache License 2.0
74 stars 8 forks source link

Fix obtaining Pack URL #58

Open 1JackBlack1 opened 3 years ago

1JackBlack1 commented 3 years ago

Fixes #57 and corrects for a mistake in a previous commit (460ba5c438ab19105b42d818ab9583bad2638fc7) preventing using a directory other than the default while still providing a useful message.

1JackBlack1 commented 3 years ago

This removes the use of the now non-existent files table in the database to obtain the pack download URL. Additionally, it also obtains a correct download URL to be able to download pack.zip. This uses a method similar to finding the fileID for the latest mod version, but jumps straight to the download URL. Alternatively, a specific fileID can be specified, in which case it directly looks up the download URL based upon the projectID and fileID.

It also allows you to use a projectID instead of a slug.

Additionally, you can once again install a pack using a directory and manifest, or specifying a directory/custom name along with a slug/projectID. Now if none of those are provided it will provide an error message saying that it was unable to find the manifest and giving instructions on how to install with the same name and slug.