🛸 Sync 2026-10-29 02:04:12

This commit is contained in:
github-actions[bot] committed 2026-10-29 02:04:12 +08:00
1 parent b21929fceb
commit bfd56813e0
37 files changed
+3918 -4346

No files matched your search

+6 -4
View File
@@ -276,9 +276,9 @@ end
function UrlEncode(szText)
if type(szText) ~= "string" then return "" end
return szText:gsub("([^%w%-_%.%~])", function(c)
return (szText:gsub("([^%w%-_%.%~])", function(c)
return string.format("%%%02X", string.byte(c))
end)
end))
end
function UrlDecode(szText)
@@ -1413,12 +1413,14 @@ function to_download_progress(app_name, task_id, total_size)
total_size = tonumber(total_size) or 0
local tmp_file = "/tmp/" .. app_name .. "_download." .. task_id
local downloaded = tonumber(fs.stat(tmp_file, "size")) or 0
local downloaded
if app_name == appname then
downloaded = 0
for part = 1, 5 do
downloaded = downloaded + (tonumber(fs.stat(tmp_file .. part, "size")) or 0)
downloaded = downloaded + (tonumber((fs.stat(tmp_file .. part, "size"))) or 0)
end
else
downloaded = tonumber((fs.stat(tmp_file, "size"))) or 0
end
local percent
if total_size > 0 then