Skip to content

Commit 18c6d5b

Browse files
committed
fix: 更换检查更新源, close #2
1 parent 0557bd6 commit 18c6d5b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

model/autoTask.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,21 +217,22 @@ export async function checkUpdateTask() {
217217
async function getRemoteVersion(type) {
218218
logger.debug(`[库洛插件] 尝试从 ${type} 检查更新...`)
219219
let checkUrl =
220-
'https://github.com/TomyJan/Yunzai-Kuro-Plugin/raw/master/CHANGELOG.md'
220+
'https://raw.githubusercontent.com/TomyJan/Yunzai-Kuro-Plugin/master/CHANGELOG.md'
221221
if (type == 'GHProxy') checkUrl = 'https://mirror.ghproxy.com/' + checkUrl
222222
if (type == 'TomyJan')
223-
checkUrl = 'https://www.tomys.top/yunzai-kuro-plug-vercheck'
223+
checkUrl = 'https://proxy.vov.moe/https/raw.githubusercontent.com/TomyJan/Yunzai-Kuro-Plugin/master/CHANGELOG.md'
224224
try {
225225
let rsp = await fetch(checkUrl)
226226
if (!rsp.ok) {
227227
logger.warn(
228-
`[库洛插件] 从 ${type} 检查更新失败: ${rsp.status} ${rsp.statusText}`
228+
`[库洛插件] 从 ${type} 获取更新信息失败: ${rsp.status} ${rsp.statusText}`
229229
)
230230
return false
231231
}
232+
logger.info(`[库洛插件] 从 ${type} 获取更新信息成功, 尝试解析信息...`)
232233
return await rsp.text()
233234
} catch (error) {
234-
logger.warn(`[库洛插件] 从 ${type} 检查更新失败: ${error.message}`)
235+
logger.warn(`[库洛插件] 从 ${type} 获取更新信息失败: ${error.message}`)
235236
return false
236237
}
237238
}

0 commit comments

Comments
 (0)