mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 06:30:52 +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
|
- Fix backported to 0.4.5 release
|
||||||
- GUI Enhancements:
|
- GUI Enhancements:
|
||||||
- Greatly improve GUI load times (300-800% on average)
|
- 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
|
## 0.4.5
|
||||||
- Fix AutoPatcher.pkg download on releases
|
- Fix AutoPatcher.pkg download on releases
|
||||||
|
|||||||
+1
-20
@@ -49,12 +49,6 @@ class check_binary_updates:
|
|||||||
else:
|
else:
|
||||||
return "TUI"
|
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):
|
def determine_remote_type(self, remote_name):
|
||||||
if "TUI" in remote_name:
|
if "TUI" in remote_name:
|
||||||
return "TUI"
|
return "TUI"
|
||||||
@@ -63,12 +57,6 @@ class check_binary_updates:
|
|||||||
else:
|
else:
|
||||||
return "Unknown"
|
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):
|
def check_binary_updates(self):
|
||||||
# print("- Checking for updates...")
|
# print("- Checking for updates...")
|
||||||
if self.verify_network_connection(self.binary_url):
|
if self.verify_network_connection(self.binary_url):
|
||||||
@@ -86,11 +74,7 @@ class check_binary_updates:
|
|||||||
# print("- Remote version is newer")
|
# print("- Remote version is newer")
|
||||||
for asset in data_set["assets"]:
|
for asset in data_set["assets"]:
|
||||||
print(f"- Found asset: {asset['name']}")
|
print(f"- Found asset: {asset['name']}")
|
||||||
if self.determine_remote_type(
|
if self.determine_remote_type(asset["name"]) == self.determine_local_build_type():
|
||||||
asset["name"]) == self.determine_local_build_type(
|
|
||||||
) and self.determine_remote_offline_type(
|
|
||||||
asset["name"]
|
|
||||||
) == self.determine_local_build_type_offline():
|
|
||||||
# print(f"- Found matching asset: {asset['name']}")
|
# print(f"- Found matching asset: {asset['name']}")
|
||||||
self.available_binaries.update({
|
self.available_binaries.update({
|
||||||
asset['name']: {
|
asset['name']: {
|
||||||
@@ -102,9 +86,6 @@ class check_binary_updates:
|
|||||||
asset["browser_download_url"],
|
asset["browser_download_url"],
|
||||||
"Type":
|
"Type":
|
||||||
self.determine_remote_type(asset["name"]),
|
self.determine_remote_type(asset["name"]),
|
||||||
"Offline":
|
|
||||||
self.determine_remote_offline_type(
|
|
||||||
asset["name"]),
|
|
||||||
"Github Link":
|
"Github Link":
|
||||||
f"https://github.com/dortania/OpenCore-Legacy-Patcher/releases/{self.remote_version}"
|
f"https://github.com/dortania/OpenCore-Legacy-Patcher/releases/{self.remote_version}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user