djp952 / pvr.hdhomerundvr

Unofficial Kodi HDHomeRun DVR PVR Client
https://github.com/djp952/pvr.hdhomerundvr/wiki
Other
60 stars 9 forks source link

Automatically rebuild database on error 11 "database disk image is malformed" in ADDON_Create #40

Closed djp952 closed 6 years ago

djp952 commented 6 years ago

User has reported issue with SQLite error 11 "database disk image is malformed" happening in ADDON_Create. While working with user to resolve issue, this seems like something that can be auto-recovered from, or at least make an attempt. There is nothing critical in the PVR database that won't be automatically rebuilt if this error is detected during ADDON_Create.

djp952 commented 6 years ago

Changed in version 1.3.5. Any exceptions that occur during the initial open/creation of the database will result in deleting it and attempting to create it again

22:57:35.750 T:10044 NOTICE: AddOnLog: HDHomeRun DVR PVR Client: ADDON_Create: zuki.pvr.hdhomerundvr v1.3.5 loading 22:57:35.785 T:10044 ERROR: AddOnLog: HDHomeRun DVR PVR Client: ADDON_Create: unable to create/open the PVR database D:\kodi-sxs\Krypton-x86\portable_data\userdata\addon_data\pvr.hdhomerundvr\/hdhomerundvr-v1.3.db - file is not a database (26) 22:57:35.785 T:10044 NOTICE: AddOnLog: HDHomeRun DVR PVR Client: ADDON_Create: attempting to delete and recreate the PVR database 22:57:35.828 T:10044 NOTICE: AddOnLog: HDHomeRun DVR PVR Client: ADDON_Create: successfully recreated the PVR database