03-21-2010, 11:36 AM | #1 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Help with Merge Records code - E-reader users and developers?
I'm working on merge records code where you will be able to select a first record, which will survive, then more records to be merged into it. The merge records will be deleted after merging is complete.
I've been looking at the code for deleting records, and it refers to 4 different "views" I'm reasonably sure that the views it refers to are the main GUI, a main memory view (probably main memory of the ereader), and two card views (A and B -probably SD cards). It looks like the code deletes books from the ereader, as well as the main database. I don't have any device that Calibre considers an ereader, so I can't check any of this. The only view I ever see is the main GUI. (At least, that's the only view my traps ever report) I'd like confirmation that these, multiple "views" do appear to those who own ereaders and that Calibre does delete books from the ereader. I'd particularly like comments on what should happen during the merge process to books on an ereader. Some records will disappear as their books are merged into the main record. I'm inclined to "do nothing" unless the system is looking at the main GUI view, then let the system do whatever it would have done if the changes had been made without an ereader connected. Alternatively, I could "do the same thing" as best I understand it, that happens when these records are just deleted. Since I've never seen these "views" I'm not even sure if "merge records" is something that one would be able to do when in these views. Comments would be appreciated. |
03-21-2010, 11:39 AM | #2 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
The more I think about it, the more I think that merger and deletion must occur in the main GUI, which means I'd have to be in view 0, which means I can ignore the other views, and simply merge and delete records from the db. Sound right?
|
Advert | |
|
03-21-2010, 12:00 PM | #3 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
(Mostly) User here By "Main GUI" are we referring to just the main book list display?
Or the Edit Meta-data display? IMHO the user should be presented this screen for final confirmation (where all is visible). Do you have a "Flow chart" of the User Actions for the Merge process? |
03-21-2010, 12:41 PM | #4 | |||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Quote:
I haven't decided if I'll overwrite the "Same format" if it already exists. I think not, since Kovid didn't like that in my code for adding new books to existing records (although I still sort of like that feature and have kept it for myself). I also haven't decided if i should merge any metadata from deleted records. If the kept record has no cover or comments or rating, but the merged records have that info, I may merge it in. (Comments on this appreciated). Last edited by Starson17; 03-21-2010 at 12:53 PM. |
|||
03-21-2010, 12:55 PM | #5 | |||
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Quote:
Can you have a "Confirmation" Dialog on another Dialog? (was not allowed on the last language (now dead) I used ) Quote:
Thanks for your efforts |
|||
Advert | |
|
03-21-2010, 01:01 PM | #6 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Concatenate all the comments from all records, (the user can edit it later) Bring in the first valid cover image if the surviving record has none, Concatenate tags, but remove duplicates, Ignore publisher and ISBN, Ratings? |
|
03-21-2010, 01:04 PM | #7 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
As a general comment, in my view I do not think the merge facility should ever affect books already downloaded to an reading device. That makes the concentration on doing it in the main GUI the right way to proceed.
|
03-21-2010, 01:06 PM | #8 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
|
03-21-2010, 01:29 PM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
03-21-2010, 01:29 PM | #10 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I was thinking the whole reason for picking the Destination first was that was the record you wished to preserve. (My original thinking was select the sources, then the destination) Your way made sense, considering you want to keep the Meta-data of that record (otherwise, you would have used a different destination record)
|
03-21-2010, 01:33 PM | #11 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
I just learned moments ago that there are additional "libraries" that appear on the main library line of the GUI corresponding to the ereader device. It may be that the part of the code I've been trying to figure out just decides if one of those libraries has been selected. |
|
03-21-2010, 01:37 PM | #12 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
03-21-2010, 01:40 PM | #13 | |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
03-21-2010, 02:31 PM | #14 | |
Evangelist
Posts: 454
Karma: 270240
Join Date: Aug 2009
Device: Sony PRS 650, PocketBook 360, Astak PocketPro (RIP), Tungsten T3
|
Quote:
Usually, I want to merge two records because I have a new one that is better than the one currently in Calibre. Having carefully edited the metadata for the book, I want to keep the cover, tags etc. that exist in that record. The current method of adding a book to an existing record works, but your version sounds much more elegant. |
|
03-21-2010, 05:26 PM | #15 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Originally I'd contemplated overwriting the destination format with same-formats in the to-be-merged records, then deleting the merged records. I suspect Kovid won't like that design. He didn't like my add books code that overwrote old formats with new. If I don't overwrite when formats overlap, then I also shouldn't delete the old record in a format overlap situation. Hmmmm. I suppose I can merge only the non-overlap formats, merge the metadata, and warn about the situation. Complexity, complexifies.... If I leave records hanging around due to format overlap, does anyone feel strongly that I need to delete the formats that were merged from the merged records, or can I just leave those records alone after merging all non-overlapping formats into the destination record? The latter is easier (and already works!). |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Merge records | mruseless | Library Management | 6 | 04-16-2014 09:01 AM |
Merge book records doesn't copy author and title ? | JackLiu | Calibre | 4 | 09-25-2010 11:36 PM |
Merge feature request (different merge) | Tarran | Calibre | 1 | 05-24-2010 10:57 AM |
Help with Merge Records - an SVG icon | Starson17 | Calibre | 3 | 03-26-2010 01:20 PM |
Developers...large format reader to review your code and annotate changes? | brecklundin | News | 13 | 09-22-2009 07:25 AM |