PullNotifications calls optimization
elpiel opened this issue · comments
Problem
Currently on every windows Focus we call the PullNotifications
action of core
. This is excessive amount of call to the addons api when really, we can expect a maximum of 1 or 2 times per day to have newly released episodes for a movie series.
Solution
Make the call to PullNotifications less often, ideally no more than 2-3 times per day.
Is there a timestamp of this call saved anywhere?
Maybe we could save a timestamp of the last call in the localStorage and condition it to fire only every 6 or 12hours that way we could limit the calls.
Would that be a valid solution?
Yes, we will implement something similar but we've decided to move this logic to stremio-core
instead of each app having to implement this logic themselves and test each implementation on it's owm.
I'm moving this issue to https://github.com/Stremio/stremio-core
This was improved by checking if only mtime has changed and skips updating the whole LibraryItem when it's the only field changes in #571