feat(update): add forced upgrade progress flow
This commit is contained in:
@@ -31,6 +31,8 @@ class UpdateInfo:
|
||||
package_format: str = ""
|
||||
updater_protocol: int = 0
|
||||
min_updater_protocol: int = 0
|
||||
signature_algorithm: str = ""
|
||||
manifest_signature: str = ""
|
||||
message: str = ""
|
||||
|
||||
|
||||
@@ -47,6 +49,8 @@ class UpdateCheckResult:
|
||||
package_format: str = ""
|
||||
updater_protocol: int = 0
|
||||
min_updater_protocol: int = 0
|
||||
signature_algorithm: str = ""
|
||||
manifest_signature: str = ""
|
||||
message: str = ""
|
||||
error: str = ""
|
||||
|
||||
@@ -131,6 +135,16 @@ def parse_update_info(payload) -> UpdateInfo:
|
||||
or release.get("min_updater_protocol")
|
||||
or 0
|
||||
),
|
||||
signature_algorithm=str(
|
||||
payload.get("signature_algorithm")
|
||||
or release.get("signature_algorithm")
|
||||
or ""
|
||||
).strip(),
|
||||
manifest_signature=str(
|
||||
payload.get("manifest_signature")
|
||||
or release.get("manifest_signature")
|
||||
or ""
|
||||
).strip(),
|
||||
message=str(
|
||||
payload.get("message")
|
||||
or payload.get("release_notes")
|
||||
@@ -202,6 +216,8 @@ def check_for_update(
|
||||
package_format=info.package_format,
|
||||
updater_protocol=info.updater_protocol,
|
||||
min_updater_protocol=info.min_updater_protocol,
|
||||
signature_algorithm=info.signature_algorithm,
|
||||
manifest_signature=info.manifest_signature,
|
||||
message=info.message,
|
||||
)
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user