(2018-02-13, 15:07)MatthewLundberg Wrote: Is there a way for the PVR to determine what entries have been cached? I could slow the retrieval for these entries.
And one more, is it possible for the PVR to inform Kodi to not cache the data?
I assume by "the PVR" you mean the global instance you can use in your addon to communicate with Kodi PVR core, for example to trigger a recordings update?
No, addons have no way to determine which entries have been cached. This is by design. An addon should and must not know about any Kodi implementation details, like existence of an epg cache or not.
Not sure what you mean with 'slowing down retrieval of cached entries'.
pvr.hts basically does nothing(!) in its implementation of GetEPGForChannel. It pushes all epg events thru EpgEventStateChange callback whenever tvheadend server notifies any changed/deleted/updated epg events. On startup of the adon, after connecting to the backeend server, all available events will be pushed as NEW, afterwards there are UPDATEs and DELETEs.
Quote:When using the async call EpgEventStateChange, what's the significance of the "state" attribute? Should the PVR send the EPG_EVENT_MODIFIED when it sends the same channel/timeslot data twice in the same session? Or back to question 1, is there a way to determine if it's changing an existing entry upon startup? What's this flag really do?
For UPDATED and NEW the state is used to speed up updating/extending existing data in kodi pvr core.
For DELETED it's the trigger to remove an event from pvr core's epg data.