tarkah / lazystream

Easily get LazyMan stream links, output directly or to m3u / xmltv formats. Streams can also be recorded or casted.
106 stars 16 forks source link

Feature Request: flag to start at game-start time #103

Open SnooPac opened 2 years ago

SnooPac commented 2 years ago

Hi. First, brilliant little program.

Would be nice to have a start flag (or even modify the --restart flag) to start at the time the game is scheduled to start. So instead of adding "--hls-live-restart", you calculate the correct offset (based on current/start times) and passing it with "--hls-start-offset".

The current --restart often has an hour+ of "this game will start shortly" or so. Unless I'm doing something wrong.

Thanks

tarkah commented 2 years ago

Hey, thanks for the request! You're not doing anything wrong, the current --restart flag uses --hls-live-restart which goes back to the beginning. This is a great idea, I just need to make sure the data is available for the actual start time of the stream to calculate the offset.

SnooPac commented 2 years ago

Awesome. Thanks for looking into it. I think the time must be available, since when I launch the program, it lists all the games and their schedule start times. So I guess you could just get current time, subtract the official start time, and set that as you set the --offset flag?

SnooPac commented 2 years ago

Oh, and I wonder, should we be able to use this new option in conjunction with --offset, or is it one or the other. I can see a use case of, you want to start from the start, but you wanna skip the first 5-7 minutes of the broadcast because you don't want to here Gene Principe making horrible puns to start the Oilers' broadcast (which is crazy, because horrible Gene Principe puns can make one's day!). But if you did want to, you might want to call it with --restart-game-time --offset +00:05:00 or so, then it would start at 7:05 instead of 7:00.

Anyway, not really necessary for me. Just a thought.