mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-14 06:54:32 +02:00
WIP caching system for Modrinth/CurseForge pack export
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"github.com/spf13/viper"
|
||||
"golang.org/x/exp/slices"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
@@ -24,6 +25,7 @@ var curseforgeCmd = &cobra.Command{
|
||||
func init() {
|
||||
cmd.Add(curseforgeCmd)
|
||||
core.Updaters["curseforge"] = cfUpdater{}
|
||||
core.MetaDownloaders["curseforge"] = cfDownloader{}
|
||||
}
|
||||
|
||||
var snapshotVersionRegex = regexp.MustCompile("(?:Snapshot )?(\\d+)w0?(0|[1-9]\\d*)([a-z])")
|
||||
@@ -442,3 +444,24 @@ func parseExportData(from map[string]interface{}) (cfExportData, error) {
|
||||
err := mapstructure.Decode(from, &exportData)
|
||||
return exportData, err
|
||||
}
|
||||
|
||||
type cfDownloader struct{}
|
||||
|
||||
func (c cfDownloader) GetFilesMetadata(mods []*core.Mod) ([]core.MetaDownloaderData, error) {
|
||||
// TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
type cfDownloadMetadata struct {
|
||||
url string
|
||||
allowsDistribution bool
|
||||
}
|
||||
|
||||
func (m *cfDownloadMetadata) RequiresManualDownload() bool {
|
||||
return !m.allowsDistribution
|
||||
}
|
||||
|
||||
func (m *cfDownloadMetadata) DownloadFile(writer io.Writer) error {
|
||||
// TODO implement me
|
||||
panic("implement me")
|
||||
}
|
||||
|
Reference in New Issue
Block a user