use cursor to create partition

This commit is contained in:
GitBluub
2024-01-18 03:42:21 +01:00
committed by Zoe Roux
parent 0bd12bbf34
commit 5d78d8b5dd
2 changed files with 9 additions and 2 deletions

View File

@@ -85,7 +85,9 @@ def send(o):
class Scorometer:
def __init__(self, mode: int, midiFile: str, song_id: int, user_id: int) -> None:
self.partition: Partition = getPartition(midiFile)
r = requests.get(f"{BACK_URL}/song/{song_id}/assets/cursors", headers=auth_header).json()
cursors = r["cursors"]
self.partition: Partition = getPartition(midiFile, cursors)
self.practice_partition: list[list[Key]] = self.getPracticePartition(mode)
# the log generated is so long that it's longer than the stderr buffer resulting in a crash
# logging.debug({"partition": self.partition.notes})