removed a old useless condition stopping the patch_file process if patch_tracks failed (not return 0), which can't happen since patch_track could only return 0

This commit is contained in:
Faraphel 2021-08-26 11:34:25 +02:00
parent 4758e6ae88
commit bb59d1dc18

View file

@ -58,9 +58,9 @@ class NoGui:
def get(self): def get(self):
return self.value return self.value
def progress(self, *args, **kwargs): print(args, kwargs) def progress(*args, **kwargs): print(args, kwargs)
def translate(self, *args, **kwargs): return "" def translate(*args, **kwargs): return ""
def log_error(self, *args, **kwargs): print(args, kwargs) def log_error(*args, **kwargs): print(args, kwargs)
is_dev_version = False is_dev_version = False
button_install_mod = NoButton() button_install_mod = NoButton()
@ -377,7 +377,7 @@ class Game:
for file in glob.glob(self.path + "/files/Scene/UI/MenuSingle_?.szs"): self.patch_bmg(file) for file in glob.glob(self.path + "/files/Scene/UI/MenuSingle_?.szs"): self.patch_bmg(file)
# MenuSingle could be any other file, Common and Menu are all the same in all other files. # MenuSingle could be any other file, Common and Menu are all the same in all other files.
self.patch_autoadd() self.patch_autoadd()
if self.patch_tracks() != 0: return self.patch_tracks()
self.gui.button_install_mod.grid(row=2, column=1, columnspan=2, sticky="NEWS") self.gui.button_install_mod.grid(row=2, column=1, columnspan=2, sticky="NEWS")
self.gui.button_install_mod.config( self.gui.button_install_mod.config(
@ -423,11 +423,9 @@ class Game:
new_4_3.paste(img_lang_4_3, (0, 0), img_lang_4_3) new_4_3.paste(img_lang_4_3, (0, 0), img_lang_4_3)
new_4_3.save(dest_dir + f"/strapA_608x456{get_filename(get_nodir(file_lang))}.png") new_4_3.save(dest_dir + f"/strapA_608x456{get_filename(get_nodir(file_lang))}.png")
def patch_tracks(self) -> None:
def patch_tracks(self) -> int:
""" """
Download track's wu8 file and convert them to szs Download track's wu8 file and convert them to szs
:return: 0 if no error occured
""" """
max_process = self.gui.intvar_process_track.get() max_process = self.gui.intvar_process_track.get()
thread_list = {} thread_list = {}
@ -500,5 +498,3 @@ class Game:
clean_process() clean_process()
while clean_process() != 1: pass # End the process if all process ended while clean_process() != 1: pass # End the process if all process ended
return 0