1
0
mirror of synced 2024-12-12 15:01:09 +01:00

Fix load_memo2 being unable to handle files that do not specify an offset

This commit is contained in:
Stepland 2020-07-25 23:33:27 +02:00
parent 97dad29bc7
commit 7a8e168ac1
2 changed files with 8 additions and 1 deletions

7
CHANGELOG.md Normal file
View File

@ -0,0 +1,7 @@
# v0.1.1
## Fixed
- Loading a #memo2 file that did not specify any offset (neither by `o=...`, `r=...` nor `[...]` commands) would trigger a TypeError, not anymore ! Offset now defaults to zero.
# v0.1.0
- Initial Release

View File

@ -449,7 +449,7 @@ def _load_memo2_file(lines: List[str]) -> Song:
metadata.preview_length = SecondsTime(10)
timing = Timing(
events=parser.timing_events, beat_zero_offset=SecondsTime(parser.offset) / 1000
events=parser.timing_events, beat_zero_offset=SecondsTime(parser.offset or 0) / 1000
)
charts = {
parser.difficulty: Chart(