Quote:
Originally Posted by Starson17
One problem with automating this is that a "book" record doesn't separately store metadata about each of the "formats" of that book.
|
Yes. I've looked into the formats_sizes() template function to see if I could write a similar one for my needs, but the function doesn't have any metadata available which was parsed from the file, it only calls some os function to get the file size.
Quote:
Each format can have a different "source" or be its own original. There's no guarantee that any one format is the source for all others.
|
That's ok, I just want to separate the precious originals from the converted ones.
My current strategy is to add a tag "Converted <format>" (<format> is replaced by the format name like "Converted MOBI" or "Converted EPUB") when a new format is created by converting. I also look into the ebook metadata when a file is added and if the contributor tag contains "calibre", I also set the same tag. If I remove a format, the corresponding tag is unassigned if it was set.
With this scheme I can always identify the formats which were created by calibre (either because I triggered a conversion from another format or because the added file was created/converted by calibre). If there is a format without the matching tag I know it's the/a original format not modified by calibre.
What do you think of this solution?
Ciao,
Steffen