fix(update): accept cmhub release metadata contract

This commit is contained in:
chengma
2026-07-13 17:17:25 +08:00
parent 74b98cd123
commit 0d7a4c1b56
8 changed files with 99 additions and 15 deletions
+3 -3
View File
@@ -75,9 +75,9 @@ def metadata_from_update_info(info):
download_url=str(getattr(info, "download_url", "") or "").strip(),
sha256=str(getattr(info, "sha256", "") or "").strip().lower(),
size_bytes=int(getattr(info, "size_bytes", 0) or 0),
package_format=str(getattr(info, "package_format", "") or "").strip(),
updater_protocol=int(getattr(info, "updater_protocol", 0) or 0),
min_updater_protocol=int(getattr(info, "min_updater_protocol", 0) or 1),
package_format=PACKAGE_FORMAT,
updater_protocol=UPDATER_PROTOCOL,
min_updater_protocol=UPDATER_PROTOCOL,
)
validate_metadata(metadata)
return metadata