View Single Post
Old 07-13-2021, 08:42 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Kobo ereaders have no problem with having multiple copies of books with the same metadata. They differentiate the books by the file path. All you need to do is change the filename or directory somehow and the device will have no trouble differentiating the book. Whether you can remember which is which, is a different matter.

So...

What is almost definitely happening is that when the second edition was sent to the device it replaced the original copy. That will be because the two copies have the same title and author. When a book is sent to the device, the save template that is defined in the driver is used to set the file name. The default for the save template is something like:

Code:
{author_sort}/{title} - {authors}
That means if calibre has to copies of "Some book" by "Some Author", when either is sent to the device, the book will be named "Author, Some/Some book - Some Author". The second copy will silently replace the original copy. This is working as designed.

The solution is to either change the metadata that is used in the save template so that they are different, maybe "Some book - munsys.com" and "Some book - PG". That would also make it easy to work out which book it is you are looking at on the device. Alternatively, you change the save template to use something that will generate a different filename. The simplest is to use the book id that calibre has. You could use:

Code:
{author_sort}/{id}{title} - {authors}
That is guaranteed to be different for books in the same library.

Or even just:

Code:
{id}
Again that is guaranteed to be different for books in the same library, but, if you used multiple libraries, it could cause problems. Of course, if you use this, all books will be in the root directory of the device. That probably won't cause problems unless you have a lot of books. But, I would not like it.


There is an issue with having books with the same title and author on the device. But, that is with calibre. Calibre matches books on the device to the library using the title and author. That means if you have to copies of the book in the library, calibre does not have a way to work out which to match to the book on the device. And if you have both copies on the device, they will probably be matched to the same copy in the library. You might be able to change this with manual matching, but, I have never tried.


If you are changing the copy of the book on the device, there is one more gotcha. When the device imports a book, it imports the metadata and ToC from the book. If you updated the book on the device, it's default behaviour is to see that it is different (only using file size), remove the book completely from the database and then import it as a new book. That means you lose the reading status, annotations and collections. The driver in calibre can bypass this so the book is not treated as new. That retains the book status and works fine if the changes do not change the internal file or ToC structure. Fixing spelling, styles and layout work fine. Changing the ToC doesn't. But, my Kobo Utilities plugin has a function to do if you are updating kepubs or epubs. It doesn't try to fix the annotations, but, if you are changing the ToC titles, or adding chapters (useful for fanfiction and similar), it will work.
davidfor is offline   Reply With Quote