Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-06-2020, 05:12 AM   #1
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Unable to add 2 books (same author) with same title but different language to ereader

Today I stumbled on an old phenomenon, which did bother me before, but I was too lazy to ask here whether there exists some simple solution for it:

Of a certain writer I have the same ebook twice: 1 copy in English and 1 copy in German.
Further, the ebook title of both is exactly the same (yes, it happens).
The English version is already on my ereader (Kobo), so when I try to add the German version on the ereader too, calibre indicates that the ebook already exists.
Apparently, calibre checks only for the ebook title (on the device), but seems to not take into account the ebook language to determine the uniqueness of an ebook.

Now, it is quite possible that there is some setting to enable/enforce this ebook uniqueness, but I was not able to find it.
Is there somebody who has a simple solution?
DrChiper is offline   Reply With Quote
Old 05-06-2020, 05:29 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,173
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you send the book to the reader by calibre matching should be done by internal calibre ids, only if the metadata.calibre file becomes deleted or corrupted ont he reader or you transfer books by some other means will title/author matching be performed.
kovidgoyal is offline   Reply With Quote
Advert
Old 05-06-2020, 06:05 AM   #3
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
Change the save template in the driver. The default is something like:

Code:
{author_sort}/{title} - {authors}
And that means when you send to device, it will replace the current book with the other book. You can change the template to include something to make it unique. Including the language would work, or the calibre id would make the file unique. So, either of these:

Code:
{author_sort}/{title} - {authors}{id}
{author_sort}/{title} - {authors}{languages}
The languages can be multiples, so you might need to handle that.

When you connect the device again, calibre should match the books correctly. As Kovid said, the metadata.calibre file should have enough to make sure the books match the correct edition. But, that might not be the case for Kobo devices. It might match both editions to the same editions. The first time they match after being sent to the device, can break the linking that calibre originally creates. If that happens, you will need to use the match function in the device list.
davidfor is offline   Reply With Quote
Old 05-06-2020, 10:54 AM   #4
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,677
Karma: 103503501
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
This will be handy to know for seriously different editions with the same title and author, though in my naivety I'd have put the language (or Author's Edition, or Abridged etc) as part of the title so as to easily know which it is on the ereader without "details".

I now edit the title of books I'm proofing to have like v19 or similar at the end, so I know straight away if I updated the ereader. I don't create a new "book" in Calibre as I'd have to re-add the cover, redo the metadata inc custom columns. I'd have backups of the source odt, docx, epub and azw anyway of every older version on the laptop and all backup systems.
Quoth is offline   Reply With Quote
Old 05-06-2020, 11:34 AM   #5
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Quote:
Originally Posted by davidfor View Post
Change the save template in the driver. The default is something like:

Code:
{author_sort}/{title} - {authors}
I did already use a modified save driver template in which language is a part:

Code:
{author_sort:list_item(0,&)}/{authors:list_item(0,&)} - {series} {series_index:0>2s} {title:'raw_field('title')'} ({pubdate}) [{languages}]
Quote:
Originally Posted by davidfor View Post
If that happens, you will need to use the match function in the device list.
I'm not sure to which function you refer of the driver. (At least I cannot find it ) Can you elaborate?

BRAINWAVE:
I think I grasp the problem:
I have 2 databases, 1 for English books and 1 for German books.
And calibre book IDs are per database unique, I suspect. So in my situation it will never work.
Hmm.

Last edited by DrChiper; 05-06-2020 at 11:41 AM.
DrChiper is offline   Reply With Quote
Advert
Old 05-06-2020, 12:10 PM   #6
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,677
Karma: 103503501
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
My stupid solution of adding -Deu or -Eng to the end of the title?

Yes, database IDs are usually only unique in a particular database and typically generated automagically.
Quoth is offline   Reply With Quote
Old 05-06-2020, 03:12 PM   #7
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Ok, I copied the German ebook into the English DB: no problems there (same columns etc.) and the German version has the current date in "modified".
Connected ereader to synchronize and, surprise :
  • calibre marks the German ebook as being "present" on the ereader (while it is not there yet)
  • callibre marks the English ebook as not being present on the ereader (while it is actually already there)

The calibre IDs of both books differ, the German one being higher (newer) as expected.
So the matching process seems somehow to use a different approach than expected.
DrChiper is offline   Reply With Quote
Old 05-06-2020, 03:18 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,040
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DrChiper View Post
Ok, I copied the German ebook into the English DB: no problems there (same columns etc.) and the German version has the current date in "modified".
Connected ereader to synchronize and, surprise :
  • calibre marks the German ebook as being "present" on the ereader (while it is not there yet)
  • callibre marks the English ebook as not being present on the ereader (while it is actually already there)

The calibre IDs of both books differ, the German one being higher (newer) as expected.
So the matching process seems somehow to use a different approach than expected.
The IDs are irrelevant. The problem is that the books when sent to the Reader have the same metadata and filenames. You need to make sure both have different filenames and metadata,
JSWolf is offline   Reply With Quote
Old 05-06-2020, 04:09 PM   #9
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
File names differ (see driver save template) and Meta data is not the same (English and German versions differ on details).
DrChiper is offline   Reply With Quote
Old 05-06-2020, 10:58 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,173
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Run calibre in debug mode and the on device column will contain text showing what kind of matching was done.
kovidgoyal is offline   Reply With Quote
Old 05-06-2020, 11:27 PM   #11
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
Quote:
Originally Posted by DrChiper View Post
I did already use a modified save driver template in which language is a part:

Code:
{author_sort:list_item(0,&)}/{authors:list_item(0,&)} - {series} {series_index:0>2s} {title:'raw_field('title')'} ({pubdate}) [{languages}]

I'm not sure to which function you refer of the driver. (At least I cannot find it ) Can you elaborate?

BRAINWAVE:
I think I grasp the problem:
I have 2 databases, 1 for English books and 1 for German books.
And calibre book IDs are per database unique, I suspect. So in my situation it will never work.
Hmm.
Rereading the question, I can see the problem. The issue is that calibre does use the metadata.calibre file to match the book. But, the entries in it are based on the last library used when connected to the device. When you change library, the matching is done on the book metadata, more than the metadata.calibre. Because of that, the book does match what you have on the device. In that case, it is matching based on the author and title. And what Kovid suggested would show this.

I'm not sure if there is any way to handle this. You can send the second edition. With the save template you are using, it would add the book. And when you connected to calibre again, whichever library you were using would show two copies of the book on the device.

I do see it, as I have some common books for testing in multiple libraries. In my case, the books are supposed to be the same, so it doesn't matter which library they came from.
davidfor is offline   Reply With Quote
Old 05-07-2020, 02:47 AM   #12
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,006
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Quote:
Originally Posted by davidfor View Post
[...] You can send the second edition. With the save template you are using, it would add the book. And when you connected to calibre again, whichever library you were using would show two copies of the book on the device.[...]
Yes, I can send. However, when selecting the title to send I got a new (never seen before) pop-up, asking me to select the desired ebook *format*. For each format the number of available files are given (all are 0 except for format epub, which is indeed the only one present).

Quote:
Originally Posted by davidfor View Post
Rereading the question, I can see the problem. The issue is that calibre does use the metadata.calibre file to match the book. But, the entries in it are based on the last library used when connected to the device. When you change library, the matching is done on the book metadata, more than the metadata.calibre. Because of that, the book does match what you have on the device.
Rereading it myself I can follow your reasoning. But there is still a catch in the last situation. The ebook metadata will also contain the language, so that can be used for matching. And when it is used, a difference could be noted.

In my last attempt I did had both ebooks in 1 database: the same DB as was used to place the English version on the ereader. By your reasoning, the calibre metadata would not have been used, but the metadata inside the ebook itself. Was that done correctly, the language difference would have been noticed and the correct ebook language version would have been flagged as already be present on the device. But it was not.

When I have time, I can try Kovids suggestion to see what the actual matching criteria is, provided debug info is understandable by me
DrChiper is offline   Reply With Quote
Old 05-07-2020, 03:18 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,173
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Its pretty likely it is doing title/author matching, since as davidfor pointed out the ids wont match across libraries. And no I am not going to add other metadata fields to the matching. Where does that stop. Should books with different publisher, different tags, different random custom columns not match? For simplicity and performance fallback matching is done by title/author, its not perfect but it is the best tradeoff.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Author Initial in title if series exists ajean4 Library Management 0 10-06-2017 04:04 PM
How to add books to title folder instead of author? Ultimist Library Management 4 07-10-2016 07:02 PM
A warning for Linux users: slow "Add Books", "Unknown" title and Author rolgiati Library Management 8 07-24-2013 04:36 PM
Title language of added books panovvladislav Calibre 2 03-25-2012 06:50 AM
Unable to add new books ManishS Kobo Reader 10 01-28-2011 01:04 AM


All times are GMT -4. The time now is 12:01 PM.


MobileRead.com is a privately owned, operated and funded community.