ggtracker/sc2reader

Incorrect time for string representation of events for LOTV replays

BurnySc2 opened this issue · 1 comments

This is kind of a non-issue but the string representation for events for LOTV replays seem incorrect.
I parsed a replay that was 11:54 long, but the events go up to 16:25.

Origin of 'bug'

return "{0}\t{1:<15} ".format(Length(seconds=int(self.frame / 16)), player_name)

Solution proposal

The frames have to be divided by 22.4 instead of by 16. But this fix only works for LOTV replays, it would again show the wrong time for WOL and HOTS replays.

PS:
I want to let you know that your repository / fork cannot be searched through the github-repository search function (e.g. cant search for class names). This is simply because it is a fork.
If you want to change that and remove the fork-link, you can write a short support ticket to github to lift the connection and it becomes searchable.
Also, google search results don't seem to show this repo when searching for ggtracker sc2reader - unsure why this is (it works in the search engine duckduckgo.com).

Thanks for bringing this up. I looked through the code, and we actually have 16 hardcoded in a lot of places that would be difficult to pass the appropriate context through for.

I wonder if we should use 22.4 anyways since the vast majority of replays now are LotV. We should probably swap it for a constant or a function call or something to make it a little more robust if we do have a better fix.

And thanks fo rhte tip on the forking thing. I'll see what I can do about that!