updates.py: Resolve failing to find new updates

This commit is contained in:
Mykola Grymalyuk
2022-05-18 21:00:55 -06:00
parent fb573b0e8c
commit 49eb82f831
2 changed files with 3 additions and 20 deletions

View File

@@ -6,6 +6,8 @@
- Fix backported to 0.4.5 release
- GUI Enhancements:
- Greatly improve GUI load times (300-800% on average)
- Resolve failing to find new updates
- Resolve failing to find binaries with `--patch_sys_vol` argument
## 0.4.5
- Fix AutoPatcher.pkg download on releases

View File

@@ -49,12 +49,6 @@ class check_binary_updates:
else:
return "TUI"
def determine_local_build_type_offline(self):
if (Path(self.constants.payload_path) / "Universal-Extensions.zip").exists():
return True
else:
return False
def determine_remote_type(self, remote_name):
if "TUI" in remote_name:
return "TUI"
@@ -63,12 +57,6 @@ class check_binary_updates:
else:
return "Unknown"
def determine_remote_offline_type(self, remote_name):
if "Offline" in remote_name:
return True
else:
return False
def check_binary_updates(self):
# print("- Checking for updates...")
if self.verify_network_connection(self.binary_url):
@@ -86,11 +74,7 @@ class check_binary_updates:
# print("- Remote version is newer")
for asset in data_set["assets"]:
print(f"- Found asset: {asset['name']}")
if self.determine_remote_type(
asset["name"]) == self.determine_local_build_type(
) and self.determine_remote_offline_type(
asset["name"]
) == self.determine_local_build_type_offline():
if self.determine_remote_type(asset["name"]) == self.determine_local_build_type():
# print(f"- Found matching asset: {asset['name']}")
self.available_binaries.update({
asset['name']: {
@@ -102,9 +86,6 @@ class check_binary_updates:
asset["browser_download_url"],
"Type":
self.determine_remote_type(asset["name"]),
"Offline":
self.determine_remote_offline_type(
asset["name"]),
"Github Link":
f"https://github.com/dortania/OpenCore-Legacy-Patcher/releases/{self.remote_version}"
}