PVR OnWake - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136) +---- Thread: PVR OnWake (/showthread.php?tid=340309) |
PVR OnWake - emveepee - 2019-02-04 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 RE: PVR OnWake - emveepee - 2019-02-04 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 RE: PVR OnWake - emveepee - 2019-02-05 I really need some help coding a change on this. I added a timeout and now my connections to the backend don't time out and channels don't get deleted but there is a problem with the Kodi code because the very first action logged that happens immediately on wake is the table updates which of course fails until the NIC resumes. Code: 17:56:33.008 T:21668 DEBUG: Thread EPGUpdater start, auto delete: false. The EPG and tables update threads need to be locked until after the OnSystemWake() to allow connections to the backend to open. The current delete all seems to fake this out by emptying the groups but I don't want to force an update since the saving the reload was the purposed of my attempted change Martin RE: PVR OnWake - emveepee - 2019-02-06 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 RE: PVR OnWake - emveepee - 2019-04-05 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 |