New feature: copy books between libraries with all custom metadata

Bug #1225484 reported by Mi Ro on 2013-09-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charles Haley

Bug Description

when book is copied from one library to another and there are defined custom metadata, these metadata are not copied.
Calibre could validate all custom metadata and if such metadata is missing in destination library, they could be automatically created.

If such metadata would already exist but their data type would be different, message could pop up.

Thank you

Changing the component for this bug.

 assignee cbhaley
 status triaged

Kovid Goyal (kovid) wrote :

@charles: Probably easiest to just compare the cc metadata for the two
libraries before copying starts, add in missing fields and warn the user
about confliscting ones.

Changed in calibre:
assignee: nobody → Charles Haley (cbhaley)
status: New → Triaged
Charles Haley (cbhaley) wrote :

@Kovid: are you convinced that this is a good idea? I know people who copy from one library to another expecting that custom metadata will be limited to that in the destination. The other problem is that the destination library will easily fill with variants of the same column unless the source libraries are well controlled, in which case the column could have been added to the destination when it was created.

I can see the use in a warning that the column setup isn't the same, but I am not at all convinced that auto-create is the right thing to do.

Kovid Goyal (kovid) wrote :

Definitely not auto create, the idea is that if the cols dont match you
popup a warning and the warning has a button to auto create missing

Charles Haley (cbhaley) wrote :

I am in favor of the warning, and less in favor of optional creation. In particular, I am concerned about type mismatches, where #foo is text/single in one and text/multiple in the other. The column cannot be created because it is already there, and changing its type isn't possible (or a good idea). Because of this, column creation would be partial. Columns with type mismatches would still not copy.

Of course, the warning dialog could separate the two cases, but that could be more confusing than warning and leaving the fix to the user.

All the above notwithstanding, if you want the option to create the missing columns added, I can do that.

Kovid Goyal (kovid) wrote :

Here's the way I see it working:

If there is a cc mismatch a warning is displayed that says, "custom
columns not the same, some data will not be copied". This warning should
probably only show up once per session per library pair. If the mismatch
is automatically fixable, then the warning should have an "auto fix"
button, that alters the destination library before copying. If the
mismatch is not fixable, or partially fixable, we do nothing.

Charles Haley (cbhaley) wrote :

Code submitted. This isn't something I would ever use, so I have no personal feeling for whether or not the solution is ideal.

Changed in calibre:
status: Triaged → Fix Committed

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers