diff --git a/src/cmds/archive.ts b/src/cmds/archive.ts index 4995d48..624d2b0 100644 --- a/src/cmds/archive.ts +++ b/src/cmds/archive.ts @@ -164,6 +164,12 @@ async function saveToGHMirror(url: string, name: string | null): Promise { })(); if (!mirrorFileDb.find((e) => e.orig.includes(stringUtils.removeQueryStr(url)))) { await githubUtils.uploadAsset(octoClient, githubAuthCfg, url, name); + if (githubAuthCfg) { + mirrorFileDb.push({ + orig: stringUtils.removeQueryStr(url), + mirror: `https://github.com/${githubAuthCfg.owner}/${githubAuthCfg.repo}/releases/download/${githubAuthCfg.tag}/${name ?? new URL(url).pathname.split('/').pop() ?? ''}`, + }); + } } }