tarkah/lazystream

Flag to add streams to M3U and XMLTV 30 minutes prior to game start

SoSJames opened this issue · 8 comments

Since many of the NHL non-national streams carry pre and post game coverage, would it be possible to add a generate flag to make the channels available 30 minutes before the posted start time?

Hmm, should this just be the default behavior?

Well, I'm not entirely sure that every stream has the pregame, so it could result in broken channel listings. I wouldn't mind if it was the default, but I figured you might get breakage complaints.

If you want to make it the default, maybe a separate XMLTV entry for the 30min that lists it as Pregame (Where Available) or something like that?

Yeah let me dig into the API to see if they note a pregame start time. If so, I can just use that. If not, I'll make this a flag as to not break things for games that don't have this.

I believe the Windows app for this: https://github.com/NHLGames/NHLGames pulls the pregame status from NHL's dataset, but I don't know if that corresponds to the stream being available or if it's just listed as part of their score reporting system.

I just gave that codebase a good review, but I don't see anywhere on the API or in the code where he is setting a "pregame" start time. Is he just setting a "status" as pregame, but the time is still the scheduled game time (the same I use)?

I don't believe this pregame start time is listed anywhere. So I'll just add an option for add X minutes to the start time.

Added a new option for xmltv:

--start-prepend <minutes>             Number of minutes to prepend to the start time of the stream [default: 0]

Thanks for the update. For reference, I believe the Windows app sets the pregame flag using the NHL game stats API. The program itself just makes the links available early. I'm pretty sure that when there's no actual pregame, the links are live early anyway and just display the "Game Begins Soon" NHL screen. Either way your update's perfect, thanks again!