bitfocus / companion-module-youtube-live

MIT License
11 stars 13 forks source link

Feature request: allow a variable to change the frequency of YouTube queries #80

Open mark-epstein opened 1 year ago

mark-epstein commented 1 year ago

When I am not streaming, 30 seconds is a reasonable, "interval between refreshments of broadcasts statuses and streams health (in seconds)." Even 60 seconds would be OK. But when I'm live, I think that a 5-second interval makes more sense, because if something goes wrong it's better that I know it right away.

Unfortunately, YouTube seems to put a 10,000-query limit on free accounts. At 5-second intervals, you run out of YouTube's patience after about 14 hours each day.

If the module accepted a variable, I could change the variable to 5 an hour before each broadcast, and after I'm done change it to some much larger number (or 0 to stop querying altogether?) so I'm not flooding YouTube with pointless status requests.

QuinnMatthews commented 1 year ago

I think the best way to implement this would be as an action that allows you to set the polling rate, I don't think it would be that hard to implement it that way.

jendamozna commented 1 year ago

You can set custom variable e.g. cust_yt_pool_interval, set own button that decrements such variable and after 1sec fires itself, and set own trigger when pool_interval is zero then run action RefreshYTStatus… You would also need another buttons to activate lazy/dense fetching and another variable to store such interval…