mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 19:28:25 +02:00
fixed the track sorting
This commit is contained in:
parent
4c5fa3f20e
commit
7b134a88a3
1 changed files with 1 additions and 0 deletions
|
@ -58,6 +58,7 @@ class CT_Config:
|
||||||
track_in_cup: int = 4
|
track_in_cup: int = 4
|
||||||
|
|
||||||
track_selection = list(filter(self.filter_track_selection, self.unordered_tracks))
|
track_selection = list(filter(self.filter_track_selection, self.unordered_tracks))
|
||||||
|
track_selection.sort(key=lambda track: getattr(track, self.sort_track_attr, 0))
|
||||||
|
|
||||||
for cup_id, track_id in enumerate(range(0, len(track_selection), track_in_cup), start=1):
|
for cup_id, track_id in enumerate(range(0, len(track_selection), track_in_cup), start=1):
|
||||||
cup = Cup(id=cup_id, name=f"CT{cup_id}")
|
cup = Cup(id=cup_id, name=f"CT{cup_id}")
|
||||||
|
|
Loading…
Reference in a new issue