From 62722871e74e8d83acbe6b76b9b0e16f26f30005 Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Sat, 3 Jun 2023 23:29:40 -0600 Subject: [PATCH] Fix URL and ignore non .zip files --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 30e4a61..706c4ad 100644 --- a/main.go +++ b/main.go @@ -68,7 +68,8 @@ func getLineageOSROMs(romDirectory string) ([]LineageOSROM, error) { splitName := strings.Split(d.Name(), "-") if len(splitName) != 5 { - log.Printf("ignoring zip file '%d', name is not formatted correctly ") + log.Printf("ignoring zip file '%s', name is not formatted correctly", d.Name()) + return nil } lineageOSROM := LineageOSROM{ @@ -77,7 +78,7 @@ func getLineageOSROMs(romDirectory string) ([]LineageOSROM, error) { ID: "TBD", Romtype: "nightly", Size: int(fInfo.Size()), - URL: fmt.Sprintf("https://lineageos-updater.deadbeef.codes/public/%s", d.Name()), + URL: fmt.Sprintf("https://lineageos-ota.deadbeef.codes/public/%s", d.Name()), Version: "TBD", }