Added ApplicationManager::Status, DownloadManager now displays data from Status, added improved progress information to DownloadManager via Task updating its Status object

This commit is contained in:
2021-11-26 12:17:26 -06:00
parent 935aed1a7a
commit 6c18e16357
10 changed files with 220 additions and 81 deletions

View File

@@ -2,7 +2,7 @@ class W3DHub
class Api
class Package
attr_reader :category, :subcategory, :name, :version, :size, :checksum, :checksum_chunk_size, :checksum_chunks,
:custom_partially_valid_at_bytes
:custom_partially_valid_at_bytes, :custom_is_patch
def initialize(hash)
@data = hash
@@ -18,6 +18,7 @@ class W3DHub
@checksum_chunks = @data[:"checksum-chunks"]
@custom_partially_valid_at_bytes = 0
@custom_is_patch = false
end
def chunk(key)
@@ -28,6 +29,10 @@ class W3DHub
@custom_partially_valid_at_bytes = i
end
def is_patch=(file)
@custom_is_patch = file
end
class Chunk
attr_reader :chunk, :checksum