Search calibre data to open a book

This uses the file metadata.calibre that calibre automatically creates when you sync your reader to Calibre.
You must edit LIBRARY_PATH in defaults.lua to make it work, it needs to point to a directory with the metadata.calibre file in it. Do not manually copy that file in any directory, this will not work, calibre needs to have put it there.
After that you can use the search functionality within the file manager.

A few points...
1.) There is a problem with Calbire writing strings with hex-unicode characters. I am not sure how to handle these, I have exchanged all german umlauts, but I have no idea what happens here to Chinese characters or similar things, here is for sure room for improvement.
2.) The search crashes with "unfinished capture" in string.find, and I have no idea why, any ideas?
3.) I would like to add some buttons e.g. case sensitive/insensitive and "search in series" and similar. But these buttons should change (maybe get a checkmark after cliking them), is there any way to do this? Right now you can just set parameters in defaults.lua to control in which fields you use and if it should be case (in)sensitive
4.) Right now it searches in the Calibre fields authors, title, lpath (the path to the file within the directory), series and tags. it is quite fast, on my Aura I get back the search results in under 30 seconds with a 200MB metadata.calibre file that has about 19000 books in it, with smaller files it should be ultra fast