To recapitulate: you have a folder that is your calibre library. That library contains lots of folders for authors, etc, eventually arriving at folders that contain readable formats (.epub, .mobi, etc). Along with those readable formats, you find the files "metadata.opf" and (sometimes) "cover.jpg". The problem is that there is either no file "metadata.db" in the library folder, or there is one but it has been recreated and is empty.
If my recapitulation is correct, then you can use calibre's restore database command to get your database back. All your precious metadata is stored in the metadata.opf files. Restore database restores the metadata.db file using the information contained in them.
Make a copy of the library in case something goes wrong, open the library, click the library toolbar button, and select "Library Maintenence" then "Restore database".
|