Skip to content

Commit e7675b6

Browse files
committed
using pyquick.github.io
1 parent 3ef0dd4 commit e7675b6

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

oclp_r/wx_gui/gui_kdk_dl.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def __init__(self, parent: wx.Frame, title: str, global_constants: constants.Con
3535
self.available_installers_latest = None
3636
self.kdk_data = None
3737
self.show_fully=False
38+
self.callback=False
3839
self.kdk_data_full=None
3940
self.backup_item=None
4041
self.kdk_data_latest = None
@@ -116,13 +117,16 @@ def _fetch_installers():
116117
self.kdk_data_latest=self.kdk_data_latest
117118
except requests.RequestException as e:
118119
wx.MessageBox(f"Fetching KDK ERROR: {e}", "Error", wx.OK | wx.ICON_ERROR)
119-
self.on_return_to_main_menu()
120+
self.callback=True
120121
thread = threading.Thread(target=_fetch_installers)
121122
thread.start()
122123
gui_support.wait_for_thread(thread)
123124
progress_bar_animation.stop_pulse()
124125
progress_bar.Hide()
125-
self._display_available_installers()
126+
if self.callback:
127+
self.on_return_to_main_menu()
128+
else:
129+
self._display_available_installers()
126130
def convert_size(self,size_bytes):
127131
for unit in ['B', 'KB', 'MB', 'GB']:
128132
if size_bytes < 1024.0:

oclp_r/wx_gui/gui_ml_dl.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
utilities,
1717
network_handler,
1818
)
19-
METALLIB_API_LINK_ORIGIN: str = "https://dortania.github.io/MetallibSupportPkg/manifest.json"
19+
METALLIB_API_LINK_ORIGIN: str = "https://pyquick.github.io/MetallibSupportPkg/manifest.json"
2020
METALLIB_API_LINK_PROXY: str = "https://oclpapi.simplehac.cn/MetallibSupportPkg/manifest.json"
2121
class MetallibDownloadFrame(wx.Frame):
2222
def __init__(self, parent: wx.Frame, title: str, global_constants: constants.Constants,screen_location: tuple = None):
@@ -32,6 +32,7 @@ def __init__(self, parent: wx.Frame, title: str, global_constants: constants.Con
3232
self.backup_item=None
3333
self.kdk_data = None
3434
self.path_validate=None
35+
self.callback=False
3536
self.retry_download:bool=False
3637
self.show_fully=False
3738
self.kdk_data_full=None
@@ -56,7 +57,7 @@ def _generate_catalog_frame(self) -> None:
5657
self.Show()
5758
def _fetch_installers():
5859
try:
59-
if self.constants.github_proxy_link!="Default":
60+
if self.constants.github_proxy_link=="SimpleHac":
6061
METALLIB_API_LINK:str=METALLIB_API_LINK_PROXY
6162
else:
6263
METALLIB_API_LINK: str = METALLIB_API_LINK_ORIGIN
@@ -118,13 +119,16 @@ def _fetch_installers():
118119
self.kdk_data_latest=self.kdk_data_latest
119120
except requests.RequestException as e:
120121
wx.MessageBox(f"Fetch Metal Libraries Error: {e}", "Error", wx.OK | wx.ICON_ERROR)
121-
self.on_return_to_main_menu()
122+
self.callback=True
122123
thread = threading.Thread(target=_fetch_installers)
123124
thread.start()
124125
gui_support.wait_for_thread(thread)
125126
progress_bar_animation.stop_pulse()
126127
progress_bar.Hide()
127-
self._display_available_installers()
128+
if self.callback:
129+
self.on_return_to_main_menu()
130+
else:
131+
self._display_available_installers()
128132
def convert_size(self,size_bytes):
129133
for unit in ['B', 'KB', 'MB', 'GB']:
130134
if size_bytes < 1024.0:

0 commit comments

Comments
 (0)