diff --git a/assets/main.db b/assets/main.db index 14c0a91..8fd5be6 100644 Binary files a/assets/main.db and b/assets/main.db differ diff --git a/handler/download.go b/handler/download.go index 8985698..03a07db 100644 --- a/handler/download.go +++ b/handler/download.go @@ -7,6 +7,7 @@ import ( "honoka-chan/config" "honoka-chan/encrypt" "honoka-chan/model" + "io" "net/http" "strings" "time" @@ -122,6 +123,20 @@ func DownloadUpdate(ctx *gin.Context) { Version: config.PackageVersion, }) } + + patchFileUrl := fmt.Sprintf("%s/%s/archives/99_0_115.zip", CdnUrl, downloadReq.TargetOs) + resp, err := http.Get(patchFileUrl) + if err == nil { + res, err := io.ReadAll(resp.Body) + if err == nil { + pkgList = append(pkgList, model.UpdateRes{ + Size: len(res), + URL: patchFileUrl, + Version: config.PackageVersion, + }) + } + defer resp.Body.Close() + } } updateResp := model.UpdateResp{