mcdex icon indicating copy to clipboard operation
mcdex copied to clipboard

Fix obtaining Pack URL

Open 1JackBlack1 opened this issue 4 years ago • 1 comments

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 avatar May 22 '21 11:05 1JackBlack1

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.

1JackBlack1 avatar May 22 '21 12:05 1JackBlack1