Open robbyblum opened 4 years ago
Both issues have been fixed in the library and web app respectively. If everything now works as expected, please let me know and feel free to close the issue.
Hey, have you been able to confirm that the web app now works correctly?
I have found a couple bugs in the code, or at least the code being used by the webapp (which I am guessing is also the most recent code on the master branch?). Attached is the txt file I put into it, and two output files, one where I checked the "Split Only On Blank Lines" option and one where I did not. In both cases, I set the video length to be 10:00.
txt2subtest.zip
So, bugs:
1. Overlapping and zero-length timecodes: None of the timecodes use fractions of seconds, and many of them are zero seconds long:
My guess is that the calculation of timeDelta on L46 is doing integer division, which always rounds down. Since we have access to milliseconds, we should probably use them if we need to. Since the default video length is apparently 60 seconds, this will likely be an issue when using that as well.
2. "Split Only On Blank Lines" in webapp doesn't do anything: The above quote is from unchecked.srt, where I did not check the box. The below is from checked.srt, where I checked the box. They seem to be the same, which I am pretty sure isn't intended! Also, don't worry about the blank lines between timecodes and text; my version of the Bee Movie script (attached as the input file) has a line consisting solely of two spaces above each actual line for some weird reason.
(The first bug probably didn't show up in your video demonstration because it looks like you didn't paste the entire Bee Movie script into the webapp. Shows the benefit of truly rigorous testing ;) )