08-31-2014, 03:45 AM | #1 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Problem merging metadata
Hi,
I've been looking for this issue, but i have found nothing about it. I have a problem when I'm merging two records when there're some difference in the metadata info. If I merge two fields which are date or number, if the destination field has a value, it keeps untouched. If I merge two fields which are defined as text with restricted values, however, if the destination field has a value, and the origin field is empty, the value in the destination filed is removed. I don't know if it's normal, I'm doing something wrong. Any help will be welcome. BTW, it's not related to calibre 2.X, it worked in the same way before. I have Win7 and I am running calibre 32bits (calibre 64 works the same too, I've tested it). Thanks in advance. |
08-31-2014, 06:45 AM | #2 |
Handy Elephant
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
|
Could be that for fields with restricted values there is no empty value. So the new value always overwrite the old, the logic that empty values don't overwrite existing doesn't apply. And I don't know how that should be changed to ensure that the "right" metadata is used. The only way around would be to be careful about using restricted values...
|
08-31-2014, 07:33 AM | #3 | |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If you select using the shift key (click on a book, press shift, click on another book), the selection is ordered from top to bottom no matter which book you clicked on first. Thus even if you clicked on the second in the list then the first, the second is being merged into the first as if you had clicked on the first then the second. If you select using the control key then Qt remembers the order. Click on the second in the list then ctrl-click on the first, after which the first will be merged into the second. I tested this as follows:
Experiment 1
Experiment 2
Experiment 3
Bottom line: if you use shift-click to select, the target book must be the first one (highest one) in the selection list. This is true no matter what order you used to select the books. |
|
08-31-2014, 01:14 PM | #4 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
chaley
That explains what I have been seeing for quite a while Can Kovid include a Warning box (with a don't show again box) to remind folk to sort the target to the top, When the 'M' feature is used? |
08-31-2014, 01:16 PM | #5 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is such a warning already, it even shows you the title of the book that will be the target book.
|
08-31-2014, 01:23 PM | #6 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
08-31-2014, 01:57 PM | #7 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Chaley, I understand what you say, I'm quite aware of this way of working. What I get of your message is that it's right to empty the destination field, although it doesn't work the same for integer or date fields (I always order the book so the destination book is the first in that order).
Perhaps @adoby is right, and that is the problem. I don't know. |
08-31-2014, 02:22 PM | #8 | |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
I just looked more carefully at the merge code. This is a bug. The "if statement" that handles enumerations is not parenthesized correctly, resulting in the source *always* replacing the destination even if the src is empty. I will submit a fix. |
|
08-31-2014, 02:33 PM | #9 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Thank you very much, chaley. As this is something I do for all my read books, it was a bit PIA.
|
08-31-2014, 07:29 PM | #10 |
null operator (he/him)
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
FWIW - I Mark the books I want merge and then Show marked books, it makes it easier to wrangle the target book to the top of the list.
BR |
09-01-2014, 05:09 AM | #11 |
Grand Sorcerer
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
09-01-2014, 06:18 AM | #12 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wrong metadata after merging | dancal | Library Management | 14 | 12-16-2012 12:36 PM |
Merging metadata when adding duplicate | magphil | Calibre | 2 | 01-14-2012 04:23 AM |
Merging duplicate entries with different formats and slightly different metadata? | maxsys | Library Management | 2 | 02-20-2011 04:19 AM |
Jobs Queue, Merging, Metadata, I think that's it.... | rabidrobot | Calibre | 2 | 08-17-2010 07:31 PM |
For Charles/Chaley Merging user defined metadata | Starson17 | Calibre | 20 | 07-22-2010 10:27 AM |