feat: 新增列表文件访问端点并兼容旧路径

服务器新增/list.txt接口提供列表文件访问,客户端优先请求该路径,失败时回退到原/uploads/list.txt路径
This commit is contained in:
2026-07-31 20:02:24 +08:00
parent fcf6970e90
commit cd22b1ca3e
2 changed files with 16 additions and 1 deletions
+4 -1
View File
@@ -1012,7 +1012,10 @@ end
function Network.syncFiles()
-- Sync only config file (list.txt) periodically
while true do
local resp = http.get(CONFIG.API_URL .. "/uploads/list.txt")
local resp = http.get(CONFIG.API_URL .. "/list.txt")
if not resp then
resp = http.get(CONFIG.API_URL .. "/uploads/list.txt")
end
if resp then
local content = resp.readAll()
resp.close()