packwiz/cmdshared/downloadutil.go
comp500 f3837af145 Completed download implementation for CF export
Added support for importing manual files and rehashing where necessary
Moved cache folder to "local" user folder
Cleaned up messages, saved index after importing
2022-05-21 03:40:00 +01:00

29 lines
820 B
Go

package cmdshared
import (
"fmt"
"github.com/packwiz/packwiz/core"
"os"
"path/filepath"
)
func ListManualDownloads(session core.DownloadSession) {
manualDownloads := session.GetManualDownloads()
if len(manualDownloads) > 0 {
fmt.Printf("Found %v manual downloads; these mods are unable to be downloaded by packwiz (due to API limitations) and must be manually downloaded:\n",
len(manualDownloads))
for _, dl := range manualDownloads {
fmt.Printf("%s (%s) from %s\n", dl.Name, dl.FileName, dl.URL)
}
cacheDir, err := core.GetPackwizCache()
if err != nil {
fmt.Printf("Error locating cache folder: %v", err)
os.Exit(1)
}
fmt.Printf("Once you have done so, place these files in %s and re-run this command.\n",
filepath.Join(cacheDir, core.DownloadCacheImportFolder))
os.Exit(1)
}
}