Closed cgcha closed 10 months ago
Ig during the past while I've made three different implementations of the same thing for new demo locating and parsing. The first was a pretty naive implementation from scratch that would poll for changes and send an update if one was found. The other two were watcher based, one using notify and the other using meta's watchman. Notify was in a partially working state, but had issues integrating with tokio that were noted on their docs. Watchman seems to be a much nicer solution, but requires an external binary to be running in the background. I'm going to go back to the first two implementations and see if I can get them working better, because we'd probably not want to have to add another binary to the process + there seem to be some issues with Windows.
async is my hell
It works! I'm not too keen about performance quite yet, but it will recognize new demo files, recognize new updates, and send the new updates to a function (that doesn't do anything atm).
Next steps:
This is looking good, yet to test it but I'm feeling good about it.
Because the server components and other related masterbase things aren't up and running quite yet, I want to wrap this in a cli argument for the time being and later add a proper settings field when we have sending data functioning. After that, testing on linux would probably be all that's left and we can leave the other steps for another pr wahaha
Yep, sounds reasonable. Happy for that to happen.
I'm going to be splitting this into a few parts: 1) demo file locating/parsing for handling both manual demo recording and automated demo tracking, 2) parsing packets and removing console spam used for faster file updates, 3) uploading to mb.
We know that vote information is somewhere in the packets, but I'm not familiar with how that's structured or where it's going to be. This pr will probably include part 1 and 2 when merged.