Kodi Community Forum

Full Version: is there an undocumented reset pvr database function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know there is a builtin function to start - restart pvr manager (StartPVRManager) but just wondering if there is an undocumented builtin function to reset the pvr database.

I'd like to reset the pvr database by adding a button within a skin I am designing for example. I want to make it easier to reset the database without having to go to LiveTV settings menu.

Does anyone have any suggestions?

bashirag
I answered my own question

use sqlite3 and create a script.. can u please delete this post mod.
I'm in the process of making a c++ addon that will handle this task calling CPVRManager::ResetDatabase(bool bResetEPGOnly /* = false */) from the PVR Manager. Hopefully it will work giving me seemless integration. It will check the hash of the m3u channel file and xmltv to see if there were updates and launch the reset automatically. The service addon will sleep every 60 minutes.
no, you will not be able to call ResetDatabase() from add-ons, as there is no API call implemented for this, and if you think you need it in an add-on, then you must revisit your design, because it is flawed.
I'll be calling it from within my PVR addon..
you must use the callback methods that are available here: https://github.com/opdenkamp/xbmc-pvr-ad...pvr.h#L241
no ResetDatabase() calls will be allowed in to make an add-on work
TriggerEPGUpdate and TriggerChannelUpdate it is then...