This patch contains a new feature and fixes a problem:
1. Added new configuration option "HIERARCHICAL_COLNAMES":
When a folder (inside the documents folder) contains subfolders, the files inside the subfolders are added to the collection of the folder. I have a hierarchical structure and I wanted to reflect this structure. Thus, if HIERARCHICAL_COLNAMES is true, subfolders are recognized and new collections are created for the subfolders. The name of the collection is the concatenated name of the folder with the subfolders, separated by space.
2. Improved hash code generation:
The hash code for ebooks was not always correctly created. Especially if the file name does not contain the ASIN number, the old version failed. I have added a new strategy, reading the ASIN number from the EXTH header of the ebook. I have tested this and it works for protected and free ebooks. Also, I have slightly modified the algorithm for computing the hash code for other files, such as PDF, as subfolders were not correctly handled. I admit this code is a kind of hack, however it works and may serve as a starting point.
Feel free to contact me in case you have any questions. I have created the patch with Eclipse, in which the sources reside a src folder.
Patch file created with Eclipse