From f4782947cde3cc15324fada1133f1219381d2fd7 Mon Sep 17 00:00:00 2001 From: Akov Stohs Date: Wed, 24 Jul 2024 23:08:30 -0700 Subject: [PATCH] fix for fix for https://developers.eveonline.com/blog/article/updates-for-equinox-developers-edition --- staticdump/load.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/staticdump/load.go b/staticdump/load.go index 56446f8c..ab689eb8 100644 --- a/staticdump/load.go +++ b/staticdump/load.go @@ -44,7 +44,16 @@ func FindLastStaticDumpChecksum(client *pester.Client) (string, error) { switch resp.StatusCode { case 200, 304: - return string(body), nil + lines := strings.Split(string(body), "\n") + for _, line := range lines { + if strings.Contains(line, "sde.zip") { + parts := strings.Fields(line) + if len(parts) > 0 { + return parts[0], nil + } + } + } + return "", errors.New("Checksum for sde.zip not found") case 404: return "", errors.New("Could not find latest static dump checksum (404)") default: @@ -123,14 +132,14 @@ func loadtypes(staticDataPath string) ([]typedb.EveType, error) { defer r.Close() var allTypes map[int64]Type - err = loadDataFromZipFile(r, "sde/fsd/typeIDs.yaml", &allTypes) + err = loadDataFromZipFile(r, "fsd/types.yaml", &allTypes) if err != nil { return nil, err } log.Printf("Loaded %d types", len(allTypes)) var allBlueprints map[int64]Blueprint - err = loadDataFromZipFile(r, "sde/fsd/blueprints.yaml", &allBlueprints) + err = loadDataFromZipFile(r, "fsd/blueprints.yaml", &allBlueprints) if err != nil { return nil, err }