mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 03:38:26 +02:00
fixed progress bar of tracks processing that wasn't updating, fixed exit that was catch by the try keyword
This commit is contained in:
parent
eba13a8b43
commit
af27096ff3
1 changed files with 4 additions and 2 deletions
|
@ -251,12 +251,12 @@ class Game:
|
||||||
self.convert_to(output_format)
|
self.convert_to(output_format)
|
||||||
|
|
||||||
messagebox.showinfo(self.gui.translate("End"), self.gui.translate("The mod has been installed !"))
|
messagebox.showinfo(self.gui.translate("End"), self.gui.translate("The mod has been installed !"))
|
||||||
exit()
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
self.gui.log_error()
|
self.gui.log_error()
|
||||||
finally:
|
finally:
|
||||||
self.gui.progress(show=False)
|
self.gui.progress(show=False)
|
||||||
|
exit()
|
||||||
|
|
||||||
def patch_autoadd(self, auto_add_dir: str = "./file/auto-add") -> None:
|
def patch_autoadd(self, auto_add_dir: str = "./file/auto-add") -> None:
|
||||||
"""
|
"""
|
||||||
|
@ -486,6 +486,8 @@ class Game:
|
||||||
else: return 0
|
else: return 0
|
||||||
|
|
||||||
total_track = len(self.ctconfig.all_tracks)
|
total_track = len(self.ctconfig.all_tracks)
|
||||||
|
self.gui.progress(max=total_track, indeter=False, show=True)
|
||||||
|
|
||||||
for i, track in enumerate(self.ctconfig.all_tracks):
|
for i, track in enumerate(self.ctconfig.all_tracks):
|
||||||
while error_count <= error_max:
|
while error_count <= error_max:
|
||||||
if len(thread_list) < max_process:
|
if len(thread_list) < max_process:
|
||||||
|
@ -494,7 +496,7 @@ class Game:
|
||||||
thread_list[track_name].setDaemon(True)
|
thread_list[track_name].setDaemon(True)
|
||||||
thread_list[track_name].start()
|
thread_list[track_name].start()
|
||||||
self.gui.progress(statut=self.gui.translate("Converting tracks", f"\n({i + 1}/{total_track})\n",
|
self.gui.progress(statut=self.gui.translate("Converting tracks", f"\n({i + 1}/{total_track})\n",
|
||||||
"\n".join(thread_list.keys())), add=1, indeter=False)
|
"\n".join(thread_list.keys())), add=1)
|
||||||
break
|
break
|
||||||
clean_process()
|
clean_process()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue