Changed how account data is stored, authorization header is now sent when logged in, adjusted spacing game filters for server list, fixed crashing when trying to load icon for game whos icon is not present, a bit of code cleanup to Api to use Async::HTTP::Client over Async::Internet directly (for everything except get requests), probably a few misc. changes

This commit is contained in:
2022-02-04 08:59:15 -06:00
parent 4996315aeb
commit 7da254fd61
11 changed files with 114 additions and 74 deletions

View File

@@ -325,8 +325,7 @@ class W3DHub
}
end
internet = Async::HTTP::Internet.instance
package_details = Api.package_details(internet, hashes)
package_details = Api.package_details(hashes)
if package_details
@packages = [package_details].flatten
@@ -515,10 +514,9 @@ class W3DHub
def fetch_manifest(category, subcategory, name, version, &block)
# Check for and integrity of local manifest
internet = Async::HTTP::Internet.instance
package = nil
array = Api.package_details(internet, [{ category: category, subcategory: subcategory, name: name, version: version }])
array = Api.package_details([{ category: category, subcategory: subcategory, name: name, version: version }])
if array.is_a?(Array)
package = array.first
else
@@ -543,7 +541,7 @@ class W3DHub
internet = Async::HTTP::Internet.instance
Api.package(internet, package) do |chunk, remaining_bytes, total_bytes|
Api.package(package) do |chunk, remaining_bytes, total_bytes|
block&.call(chunk, remaining_bytes, total_bytes)
end
end