benchen71 / epub-metadata-editor

Edit the metadata of EPUB files
192 stars 11 forks source link

Metadata batch edit breaking epub files #65

Closed TheCrappyCompletionist closed 2 years ago

TheCrappyCompletionist commented 2 years ago

This is actually related to the previous issue I've had that was marked as resolved - The metadata editor would give me an error as seen here: https://github.com/benchen71/epub-metadata-editor/issues/63

but now I found out how the files are being corrupted. I'm batch editing the files, and the editor is breaking the package.opf file. I manually correct the error, but after batch editing it a second time, the file breaks again. Not sure why. image ^ basically above was in correct format, but after pressing batch edit, the file broke again and now looks like this

TheCrappyCompletionist commented 2 years ago

more details: I'm trying to batch edit the following fields: image

benchen71 commented 2 years ago

OK, it looks like something might be wrong when using the batch edit to replace Creator 2 with a blank string. I'll investigate...

TheCrappyCompletionist commented 2 years ago

Also, is there a way to batch edit the creator 1 and 2 type? like set them to author/illustrator etc.?

benchen71 commented 2 years ago

I've confirmed the error: the code is not handling multiple creators with EPUB3 files correctly when replacing fields with an empty string.

benchen71 commented 2 years ago

I think the problem has been dealt with. And as a bonus for waiting for patiently, I've also added the ability to batch set the creator1 and creator2 roles! Check out 1.8.11.