feat: 新增列表文件访问端点并兼容旧路径
服务器新增/list.txt接口提供列表文件访问,客户端优先请求该路径,失败时回退到原/uploads/list.txt路径
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user