Stream not available yet, will check again soon...
macray76 opened this issue · 3 comments
Hi there.
Not an issue but more of a request for info or a request for an enhancement depending on the answer!
I'm using a SQLite database to store which teams I want to record and then a bash script loops through them and fires your script to record. However, last night the NYI game was postponed and your script waits until a stream is available but that will never happen. This means that my script never continues to the other teams I want to record.
The output from your script is "Stream not available yet, will check again soon..."
So is there a variable to either turn this retry off or only let it check again X number of times (and set this to zero so it doesn't recheck)?
If there isn't such a thing then any chance this could be added to a future release?
Loving your script BTW.
Cheers.
Yeah, I can definitely add a flag to disable the retry, then you can build out your own retry logic if you'd like. Glad you're liking the program!
I've added the following new flag:
--disable-retry Disables unavailable stream retry for `play`, `record`, and `cast` commands. Program will exit instead
Now program just exits with the following error:
❯ cargo run -- play team TBL --disable-retry
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Running `target/debug/lazystream play team TBL --disable-retry`
Found matching team for TBL
Game found for today
Using stream feed NATIONAL
ERROR: Stream not available yet
Fantastic! Appreciate the quick enhancement on this 'fairly niche' request!