Improved WAD name formatting for batch downloads

Also started working on a fix for the checkmark/X icons denoting a ticket not appearing anymore.
This commit is contained in:
2024-12-18 09:08:21 -05:00
parent 6660e129a8
commit 87da32d62e
6 changed files with 33 additions and 37 deletions

View File

@@ -99,6 +99,8 @@ def run_nus_download_dsi(out_folder: pathlib.Path, tid: str, version: str, pack_
# Use a typed TAD name if there is one, and auto generate one based on the TID and version if there isn't.
progress_callback.emit("Packing TAD...")
if tad_file_name != "" and tad_file_name is not None:
# Batch downloads may insert -vLatest, so if it did we can fill in the real number now.
tad_file_name = tad_file_name.replace("-vLatest", f"-v{title_version}")
if tad_file_name[-4:].lower() != ".tad":
tad_file_name += ".tad"
else:
@@ -112,15 +114,3 @@ def run_nus_download_dsi(out_folder: pathlib.Path, tid: str, version: str, pack_
if (not pack_tad_enabled and pack_tad_chkbox) or (not decrypt_contents_enabled and decrypt_contents_chkbox):
return 1
return 0
def run_nus_download_dsi_batch(out_folder: pathlib.Path, titles: List[Tuple[str, str, str]], pack_tad_chkbox: bool,
keep_enc_chkbox: bool, decrypt_contents_chkbox: bool, use_local_chkbox: bool,
progress_callback=None):
for title in titles:
result = run_nus_download_dsi(out_folder, title[0], title[1], pack_tad_chkbox, keep_enc_chkbox,
decrypt_contents_chkbox, use_local_chkbox, f"{title[2]}-{title[1]}.tad",
progress_callback)
if result != 0:
return result
progress_callback.emit(f"Batch download finished.")
return 0