mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 21:16:30 +02:00
Add support for legacy.curseforge.com URLs
This commit is contained in:
parent
2b878f5e28
commit
7b380f23df
@ -121,7 +121,7 @@ func getCurseforgeVersions(mcVersions []string) []string {
|
|||||||
|
|
||||||
var urlRegexes = [...]*regexp.Regexp{
|
var urlRegexes = [...]*regexp.Regexp{
|
||||||
regexp.MustCompile(`^https?://(?P<game>minecraft)\.curseforge\.com/projects/(?P<slug>[^/]+)(?:/(?:files|download)/(?P<fileID>\d+))?`),
|
regexp.MustCompile(`^https?://(?P<game>minecraft)\.curseforge\.com/projects/(?P<slug>[^/]+)(?:/(?:files|download)/(?P<fileID>\d+))?`),
|
||||||
regexp.MustCompile(`^https?://(?:www\.|beta\.)?curseforge\.com/(?P<game>[^/]+)/(?P<category>[^/]+)/(?P<slug>[^/]+)(?:/(?:files|download)/(?P<fileID>\d+))?`),
|
regexp.MustCompile(`^https?://(?:www\.|beta\.|legacy\.)?curseforge\.com/(?P<game>[^/]+)/(?P<category>[^/]+)/(?P<slug>[^/]+)(?:/(?:files|download)/(?P<fileID>\d+))?`),
|
||||||
regexp.MustCompile(`^(?P<slug>[a-z][\da-z\-_]{0,127})$`),
|
regexp.MustCompile(`^(?P<slug>[a-z][\da-z\-_]{0,127})$`),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user