mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 01:02:34 +00:00
Added parallel downloads setting (not in gui options yet), added a thread pool for downloading multiple packages at once- quite helpful for TSR 😁, fixed download resuming (used wrong file mode...)
This commit is contained in:
@@ -55,9 +55,9 @@ class W3DHub
|
||||
|
||||
create_directories(path)
|
||||
|
||||
file = File.open(path, "ab")
|
||||
if (start_from_bytes > 0)
|
||||
headers["Range"] = "bytes=#{start_from_bytes}-#{package.size}"
|
||||
file = File.open(path, start_from_bytes.positive? ? "r+b" : "wb")
|
||||
if (start_from_bytes.positive?)
|
||||
headers["Range"] = "bytes=#{start_from_bytes}-"
|
||||
file.pos = start_from_bytes
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user