View Single Post
Old 06-16-2022, 03:37 AM   #31
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,861
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidfor View Post
I have never looked for the last modified date in the OPF. And with the way calibre handles it, it would make no sense. If you needed to use these to rebuild your library, the last modified date would be set to the current time. Or when the book was added to the rebuild library.

But, that wasn't really what I was meaning. Triggering writing of the OPF is done when the metadata is change. The data gets marked as "dirty", the modified time is updated and then the book is put into the queue for the backup. If you do a lot of changes quickly, such as changing a common tag, you can see the the last thing happening in the "Library metadata backup status" under "Library Maintenance". That shows how many are to be written.
- Ah-ha, now I remember, writing the OPF is 'triggered' by the existence of a book id in the metadata_dirtied table. Normally it's empty, but if you change a lot of books (e.g. by deleting an overused tag) and close calibre, you can see the outstanding book ids in that table, the calibredb backup_metadata command will 'process' them quickly, where 'process' is write the OPF and delete the entry from the metadata_dirtied table.

Which doesn't explain the purpose of the last_modified column… not to me at least.

BR

Last edited by BetterRed; 06-16-2022 at 03:41 AM.
BetterRed is offline   Reply With Quote