Posts: 1,976
Joined: Jul 2012
Reputation:
72
Currently in the OnWake() function the PVR calls the client OnSystemWake() and then proceeds to empty and repopulate the database no matter what state it is in. It takes me about six seconds to resume and then another couple of minutes to load. This makes no sense when I just step away from the PC for a short time. Right now it is faster to exist Kodi, sleep and restart Kodi after the resume.
Would it not be better to NOT clear the database and let the table update work based on the system timers that were already being checked?
Martin
Posts: 1,976
Joined: Jul 2012
Reputation:
72
The actual problem seems to that when the client comes back from sleep the NIC is not initially active so the calls from NextPVR to get the groups fails. Before deleting the files Kodi should run GetStatus() to see if the backend is up.
Martin
Posts: 1,976
Joined: Jul 2012
Reputation:
72
After some testing I think the PVR OnWake function needs to be re-worked to be controlled. A couple of addons use it to wake the back end but ultimately the issue of the connection being temporarily lost at startup after wake cannot safely be handled with the current logic. I will open an issue on this.
Martin
Posts: 1,976
Joined: Jul 2012
Reputation:
72
Anyone have thoughts on this? Users are complaining about crashing and I can understand that given that all the OnWake logic is happening assuming that the connection is solid, and there are lots of collisions with updates and re-connections after the client wakes because the NIC is still not available for some time. I avoided some collisions by disconnecting allowing re authentication and WOL but that doesn't alway stop Kodi from continuing through the all the OnWake() functions.
Martin