I had a lot of empty folders after a while when using Calibre over many upgrades. The folders only had the cover and the calibre library files. So there were a lot of books in the library with no content.
I made a script to remove these entries and then refreshed/repaired the database from Calibre. For this interested this is the script at
https://github.com/phiroict/calibre-ebook-cleaner
Have fun!