Get a database cursor earlier to avoid an unnecessary try/except block.
Remove the database processing for release. It currently does nothing.
Only add the kepub extension when extra features are enabled.