Quote:
Originally Posted by geekraver
That's a good option. It may still be worth a PR though; it seems like missing functionality in the database repair options. If I have a format not in the DB, it seems reasonable to want to either add it to the database or delete it from the file system; right now only the latter is available.
|
Working out whether some random file in the book folder is in fact an addable format is non-trivial. You must determine a) whether it is a valid format file type, b) determine if there isn't already such a format, c) determine that the book record actually exists, then d) whether the format will have the same name, which if true can cause data loss. Then you must e) add the format, and f) delete the "random file", both in a reliable (atomic) way. In the "check database" context you must do this on a folder-by-folder basis, controlling the fix options appropriately.
If you want to take this on then have at it, but bear in mind that in this case "you touched it last".