In a perfect world the case of file and folder names inside a Calibre library will match the values stored in the Calibre metadata database. However if Calibre is running on a system with a case insensitive file system (e.g Windows) if a case mismatch between the Calibre database and the underlying file system actually happens it is ignored and as a result the user is unaware of such mismatches. If the Calibre library and/or the calibre2opds generated catalog are then run on a case sensitive system (e.g. Linux) then this case mismatch matters. A visible symptom of such a case mismatch in a calibre2opds generated catalog is that the catalog cannot find the underlying eBook files for those books that are affected.
Calibre2opds has now been upgraded to detect such mismatches in case between the Calibre metadata database and the underlying file system. This is handled at two levels:
- The first level is to write warning messages to the calibre2opds log. The user can then peruse the log and use the Calibre program to correct such mismatches. The simplest way to do this in Calibre is to edit the Author by adding an extra character at the end and press OK. Having done this rename the author back to the correct value and press OK again. This double rename strategy will result in the underlying files matching the case set in the calibre metadata database.
- The second level is a new option in calibre2opds (on the Main tab) to get Calibre2opds to automatically rename files to match the case stored in the Calibre database. A secondary benefit of using this approach is that the resulting Calibre library can now be migrated to a system (e.g. Linux) without calibre losing track of the books in the library. One word of caution is that since this option actually changes (slightly) the names of the files in the Calibre library it is advisable to make a backup of your library the first time you use it in case something goes wrong. It is not believed that this is likely as extensive testing has been done to try and avoid it becoming an issue but until feedback is obtained on real-world usage such a precaution is just common sense.
Which of the above approaches is used is up to the user. Feedback on how effective/useful the two options are in real world usage would be appreciated.
To help make it more obvious to end-users that there is information of potential interest in the Calibre2opds log file the dialog displayed at the end of a generation run now also displays the counts (if any) of error or warning messages written to the current log. The user can then select the option on the Tools menu to view the current log file to see what messages were logged.