mirror of
https://github.com/NinjaCheetah/NUSGet.git
synced 2026-02-27 15:15:28 -05:00
Added support for custom download directories
This commit is contained in:
@@ -46,6 +46,12 @@ def connect_label_to_checkbox(label, checkbox):
|
||||
checkbox.toggle()
|
||||
label.mousePressEvent = toggle_checkbox
|
||||
|
||||
def connect_is_enabled_to_checkbox(items, chkbox):
|
||||
for item in items:
|
||||
if chkbox.isChecked():
|
||||
item.setEnabled(True)
|
||||
else:
|
||||
item.setEnabled(False)
|
||||
|
||||
def check_nusget_updates(app, current_version: str, progress_callback=None) -> str | None:
|
||||
# Simple function to make a request to the GitHub API and then check if the latest available version is newer.
|
||||
@@ -76,6 +82,7 @@ def get_config_file() -> pathlib.Path:
|
||||
|
||||
def save_config(config_data: dict) -> None:
|
||||
config_file = get_config_file()
|
||||
print(f"writing data: {config_data}")
|
||||
open(config_file, "w").write(json.dumps(config_data))
|
||||
|
||||
def update_setting(config_data: dict, setting: str, value: any) -> None:
|
||||
|
||||
@@ -132,6 +132,8 @@ def run_nus_download_wii(out_folder: pathlib.Path, tid: str, version: str, pack_
|
||||
else:
|
||||
progress_callback.emit(" - No patches could be applied! Is this a stub IOS?")
|
||||
title = ios_patcher.dump()
|
||||
# Append "-PATCHED" to the end of the WAD file name to make it clear that it was modified.
|
||||
wad_file_name = wad_file_name[:-4] + "-PATCHED" + wad_file_name[-4:]
|
||||
# Have libWiiPy dump the WAD, and write that data out.
|
||||
version_dir.joinpath(wad_file_name).write_bytes(title.dump_wad())
|
||||
progress_callback.emit("Download complete!")
|
||||
|
||||
Reference in New Issue
Block a user