mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
updates.py: Resolve failing to find new updates
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user