View Single Post
Old 01-28-2011, 05:12 PM   #29
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by kiwidude View Post
Yeah, I think you would want to have all three possibilities - discard duplicate formats (existing behaviour), overwrite duplicate formats and create new books for duplicate formats. Perhaps in the Preferences there is a top level "automerge" checkbox like you have now, with these three as the radio button sub-options.
I like that, but what seems most desired is some listing of "duplicates" with some way to view each and select between the three options.

Quote:
One thing I don't understand (perhaps it is legacy code not yet addressed?) is why you would have different matching logic between having automerge turned on or off.
Yes, it's legacy. Kovid's original code was to match on identical titles only - without any regard to author. It's useful where you don't even have an author for the incoming book (perhaps all you have is the filename and it's just the book title.). Automerge is sort of the opposite - it does exact matches on author, but is flexible/fuzzy on the title. Automerge really needs both. Exact match on author only isn't really very useful.

Quote:
Surely a duplicate is a duplicate - you either automatically merge it using the choice in Preferences, or you prompt the user what to do interactively (giving them the three choices)?
Yes, once you've got an option, you can do the "correct" thing. It's just that so far, the option to do different things hasn't been written. We've tried to set it up to do "bulk" handling of them all. With automerge off, you get a tiny option of adding all the "duplicate" titles as new books or not adding them at all, so you can consider duplicate titles to be "duplicates" even without an author, but you wouldn't want to consider them to be duplicates in the automerge setting without info on the author.

Quote:
I wonder if running a duplicates search could be done as a GUI plugin. However I am hesitant to start investigating down that plugin route unless Kovid agrees (after all we can just deprecate the plugin later) as it seems like a feature that he perhaps may want built into Calibre to give wider user exposure. Plus he could obviously write it way better than I would anyway, though he has to find the precious time to do it first. The sub-options within automerge such as "create new book for duplicate formats" would require Calibre source changes of course.
I'm comfortable in the code for creating records, deleting records, grabbing incoming files and associated metadata, moving metadata around, searching the library for dupes, etc. but haven't had time to look very far into user interface construction. My skill stops at adding an option box and storing/retireving the option or adding a warning dialog and allowing that warning to be turned off.

That's part of why I never did any of the "option to do something with duplicates" or "option to control fine-grain of metadata during merging." One has to present the results, provide selection boxes for what to do, provide an option to view the book, or metadata, etc. and I just haven't had time to play with QT enough to learn that stuff. Heck, I tried to just change the custom user recipes into alphabetical order, and couldn't get there, even with Kovid's sample code of alphabetical order built-in recipes. I ended up cheating and making the search produce an alphabetical order result dataset so I didn't have to sort the results in the GUI.
Starson17 is offline   Reply With Quote