Releases: kszlim/osu-replay-parser
v7.0.1
v7.0.0
Breaking Changes
This release applies a breaking change by removing the first two frames of osr lzma data. No api methods or signatures have been changed. If you do not rely on the specifics of replay frames, you may safely upgrade. Otherwise, read below.
The first two frames of an osr are unusual: the first frame always has a time of 0 and a position of (256, -500), while the second frame has a time value of first_break - 1 and a similar position of (256, -500). These are marker frames placed by stable. Previously, we left them in, but these two frames can cause issues for non-std gamemodes. For instance, an x value of 256 is treated as K9 in mania.
We now remove both of these frames. If you need access to the values contained in these frames for whatever reason, and can no longer access them due to this release, please open an issue.
v6.0.2
- fix some lazer replays failing to parse
v6.0.1
- fix mania keys being parsed incorrectly
v6.0.0
Parsing replays is now done through static methods on Replay:
Replay.from_path- parse from a path (most common)Replay.from_file- parse from a live file objectReplay.from_string- from a string holding the contents of a replay
The concept of "pure lzma" and parsing only the replay data portion of a replay has been replaced with parse_replay_data, which takes optional parameters decoded and decompressed, as well as a new mode parameter. It now returns List[ReplayEvent] instead of a Replay with only play_data filled, as before.
Replay writing has been added, and is done through a matching set of methods:
Replay.write_path- write the replay back to a pathReplay.write_file- write the replay back to a live file objectReplay.pack- return the contents of the replay as a string, suitable for writing to an osr file
Also added replay.rng_seed, which will be set for replays which have the rng seed.
Several attributes have been renamed to bring osrparse closer to osu!'s internal naming of attributes:
number_{300, 100, 50}s->count_{300, 100, 50}{geki, katu, misses}->{count_geki, count_katu, count_miss}is_perfect_combo->perfectgame_mode->modeplayer_name->usernameplay_data->replay_datamod_combination->mods
Finally, this release brings a readthedocs: https://kevin-lim.ca/osu-replay-parser/.
v5.0.0
- add parsing for all gamemodes, not just osu!std
- each gamemodes returns their own
ReplayEventsubclasses with specific attributes. See the readme for documentation on each mode'sReplayEventsubclass
- each gamemodes returns their own
- rename
ReplayEvent.time_since_previous_actiontoReplayEvent.time_delta - rename
ReplayEvent.keys_pressedtoReplayEvent.keys - change
ReplayEvent.keys_pressed(nowReplayEvent.keys) to a newKeyenum instead of a raw int
v4.0.1
- fall back to parsing replay_id as a short if parsing as a long fails
- this can occur for some old replays
v4.0.0
- parse
replay_idfor replays - add scorev2 and mirror mods
mod_combinationis now anIntFlaginstead of a list of enums- add support for parsing "pure" lzma strings
- this is useful for replays retrieved from the api, since the api only gives us the lzma replay data and nothing else, unlike osr files
- remove the last frame, which contains the "rng seed", after a certain osu! version
- add type annotations to public-facing members
- rename
GameModemembers for consistency - implement
__str__,__eq__,__hash__forReplayEvent - replace raising
Exceptionwith raisingValueErrorinstead