Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate a new replay hash when packing replay data #32

Open
bemxio opened this issue Mar 15, 2022 · 2 comments
Open

generate a new replay hash when packing replay data #32

bemxio opened this issue Mar 15, 2022 · 2 comments

Comments

@bemxio
Copy link
Contributor

bemxio commented Mar 15, 2022

since some people would probably want to edit replay events
not sure if osu! checks for the replay data hash itself, but it would be good for it to match

@tybug
Copy link
Collaborator

tybug commented Mar 15, 2022

hmm…arguably it's sometimes expected behavior that the replay hash doesn’t match. If a user changes both replay_data and replay_hash (for whatever reason), they would probably expect their replay_hash to not be overwritten by us re-computing the hash based on the modified replay_data.

That said, I do think that this is a good think to add as a parameter recalculate_replay_hash in our packing methods, which would update replay_hash based on replay_data as you've described. Not sure if it should default to True or False yet (strictly speaking, True would be a breaking change).

@bemxio
Copy link
Contributor Author

bemxio commented Mar 16, 2022

i think a parameter for that would be good enough
i will try to make a PR today, with the change on

i guess False is good enough to be a default value
if someone would want to be sure that it will work the way they want it to work, they would need to just check the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants