diff --git a/src/common/utils.ts b/src/common/utils.ts index c6c37e9..d1fa501 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -38,7 +38,12 @@ export function isNumeric(str: string) { } export async function updateLLOneBot() { let mirrorGithubList = ["https://mirror.ghproxy.com"]; - return true; + const latestVersion = await getRemoteVersion(); + if (latestVersion && latestVersion != "") { + const downloadUrl = "https://github.com/LLOneBot/LLOneBot/releases/download/v" + latestVersion + "/LLOneBot.zip"; + const realUrl = mirrorGithubList[0] + downloadUrl; + } + return false; } export async function getRemoteVersion() { let mirrorGithubList = ["https://521github.com"]; diff --git a/src/renderer/index.ts b/src/renderer/index.ts index af26786..8bbe09c 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -90,7 +90,7 @@ async function onSettingWindowCreated(view: Element) { ], 'ob11.messagePostFormat', config.ob11.messagePostFormat), ), SettingItem( - 'ffmpeg 路径,发送语音、视频需要,同时保证ffprobe和ffmpeg在一起', `配置可参考 官方文档 路径:${!isEmpty(config.ffmpeg) ? config.ffmpeg : '未指定'}`, + 'ffmpeg 路径,发送语音、视频需要,同时保证ffprobe和ffmpeg在一起', `配置可参考 官方文档 路径:${!isEmpty(config.ffmpeg) ? config.ffmpeg : '未指定'}`, SettingButton('选择', 'config-ffmpeg-select'), ), SettingItem(