mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
Update song_hash.py
This commit is contained in:
@@ -114,12 +114,16 @@ def build_song_hashes(output_dir=Path("cache")):
|
|||||||
tja = TJAParser(tja_path)
|
tja = TJAParser(tja_path)
|
||||||
all_notes = NoteList()
|
all_notes = NoteList()
|
||||||
diff_hashes = dict()
|
diff_hashes = dict()
|
||||||
|
|
||||||
for diff in tja.metadata.course_data:
|
try:
|
||||||
diff_notes, _, _, _ = TJAParser.notes_to_position(TJAParser(tja.file_path), diff)
|
for diff in tja.metadata.course_data:
|
||||||
diff_hashes[diff] = tja.hash_note_data(diff_notes)
|
diff_notes, _, _, _ = TJAParser.notes_to_position(TJAParser(tja.file_path), diff)
|
||||||
all_notes.play_notes.extend(diff_notes.play_notes)
|
diff_hashes[diff] = tja.hash_note_data(diff_notes)
|
||||||
all_notes.bars.extend(diff_notes.bars)
|
all_notes.play_notes.extend(diff_notes.play_notes)
|
||||||
|
all_notes.bars.extend(diff_notes.bars)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Failed to parse TJA {tja_path}: {e}")
|
||||||
|
continue
|
||||||
|
|
||||||
if all_notes == []:
|
if all_notes == []:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user