A couple updates:
First, it's possible that I have a solution to the script errors that happen when there's only a single game for the day. The biggest issue is finding a way for me to reproduce it so that I can actually test the fix. The next day with only one game is the 27th. Hopefully I'll be able to manually reproduce the error and test the fix before then.
Second, I just started adding code for rewinding live games to my repository. If you're interested, it's in the
HLS server branch of my github repository. This feature is most certainly a hack, but I haven't been able to find any other way to get it to work. Here's roughly how it works:
Everything in the playlist is a sequential value or a timestamp. Since the games listing provides us with a game start time, I just roll back the sequential values and timestamps to that point in time. Now that I have the start of the playlist figured out, the hackiness of this solution starts to come into play. The only way I've found to get ffmpeg to actually start at that point (while still being able to skip around in the stream) is to give it
an 'endlist' playlist. This means that no more video segments can be added to the playlist. Since the game is still live, I don't actually know when it'll end (sadly precognition is not one of my skills, nor am I a time traveler). So, I just opt to make a playlist that is 4 hours long, starting from the start of the game. I hope that'll cover even the wildest of games.
Now, how can you get access to this feature to test it out? I'm not really sure. I'm thinking that I might package up a development version of the add-on, which is separate from the main version. Part of my reasoning for doing that is because I'm honestly not sure how well all this will work when I start pushing out updates, and I'd like to be able to test things before I release it for general consumption.