version is now loaded when counting track

This commit is contained in:
raphael60650 2021-06-20 10:01:24 +02:00
parent ef5ab72131
commit d3892b6e3c

View file

@ -10,6 +10,7 @@ def count_track(self):
tracks = [] tracks = []
with open("./ct_config.json", encoding="utf-8") as f: with open("./ct_config.json", encoding="utf-8") as f:
ctconfig = json.load(f) ctconfig = json.load(f)
self.VERSION = ctconfig["version"]
for cup in ctconfig["cup"].values(): for cup in ctconfig["cup"].values():
if not (cup["locked"]): tracks.extend(cup["courses"].values()) if not (cup["locked"]): tracks.extend(cup["courses"].values())
tracks.extend(ctconfig["tracks_list"]) tracks.extend(ctconfig["tracks_list"])
@ -80,7 +81,6 @@ def patch_track(self, tracks, total_track="?"):
for track_file, process in process_list.copy().items(): for track_file, process in process_list.copy().items():
if process is not None: if process is not None:
if process.poll() is None: if process.poll() is None:
print("still running...")
pass # if the process is still running pass # if the process is still running
else: # process ended else: # process ended
process_list.pop(track_file) process_list.pop(track_file)