Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Currently SpaceDock supports these formats to download a mod:
Both require you to know the version you want; it would be nice to generate a permalink that always returns the default version without having to know what it is.
Changes
Now a new URL format returns the default download for a given mod, based on format 1 above with the version omitted (these are not currently valid links and are provided just as examples):
The mod name can also be omitted:
If you name your mod
download
, it will be impossible to view the mod info page via the/mod/id/name
route. But it will already be impossible to do all sorts of other things like update or edit, so too bad for you.The Download button at the top of the mod info page and the Download buttons on the mod pack listing are updated to use the new URL format.
Fixes #251.