Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-18-2026, 12:45 PM   #1
Shark69
Zealot
Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.
 
Shark69's Avatar
 
Posts: 139
Karma: 493152
Join Date: Mar 2012
Location: Spain
Device: Kindle Oasis 2
[GUI Plugin] Swapped Metadata Fixer

Swapped Metadata Fixer

A calibre plugin that fixes books in which the Title and Author are swapped
(and often missing their accents) — a corruption that is baked inside the
.epub's own internal metadata. It is common in some book
compilations, but the tool itself is general-purpose.

It bundles three tools: (1) repair the calibre library, (2) repair the
Title/Author inside the .epub file, and (3) detect record<->epub mismatches —
each selectable from a "What do you want to do?" drop-down.

Code:
WRONG ->  Title: "AA. VV."                Author: "A Delightful Christmas"
RIGHT ->  Title: "A Delightful Christmas"   Author: "AA. VV."
The plugin reads each book's internal .epub metadata (it does not trust only
the calibre record, which is exactly what is wrong), proposes the correction (with
accents recovered when possible), shows you a reviewable table, and applies only
what you tick. Nothing is changed until you press Apply.

What it does — three operations
  • Repair calibre library — the normal one: fixes the Title/Author you see in
    calibre (writes via calibre's API, so the sort is regenerated automatically and it
    works with calibre open). Optional checkbox to also fix the inside of the .epub.
  • Repair inside the .epub — rewrites Title/Author inside the file itself
    (useful for e-readers or sharing). It backs up each .epub before touching it.
  • Detect record<->epub mismatches (advanced) — lists books whose calibre
    record does not match the .epub; you choose per row which side wins. In a normal
    library this shows many legitimate differences (subtitles, manual edits...), so it
    is informational, not a "select all and apply" mode.

Features
  • Reviewable table: per-book checkbox, edit any proposal (double-click), an ID
    column, a search/filter box, copy cells (Ctrl+C) to paste into calibre's search.
  • Robust detection that avoids false positives on tricky cases: biographies titled
    with a person's name, EpubLibre collection codes like [DIPUB 2], multi-author books,
    editors/illustrators listed as creators, punctuation/accents, and "AA. VV."
    anthologies whose full author list lives in the OPF file-as.
  • Mismatch mode niceties: per-row direction (epub->DB or DB->epub), per-field
    colour cues (title in blue, author in orange), bulk select + set direction, and on
    "Title & Author" rows you can click the Note cell to apply both / only title / only
    author.
  • Scope the check by whole library, by publisher, by date (any format), or by ID
    (one or several) — handy to review a single book instantly.
  • Parallel .epub reading with a live progress counter and a Stop button; works with
    calibre open (uses the calibre DB API).
  • Bilingual UI: English, or Spanish if calibre's interface language is Spanish.

Requirements
  • calibre 6.0 or newer (it uses the Qt6 "qt.core" API).
  • Windows, macOS or Linux.

Installation
  • Manual: download the attached .zip (do not unzip it) ->
    Preferences -> Plugins -> "Load plugin from file" -> choose the .zip -> restart
    calibre.
  • If you don't see the button on the toolbar: Preferences -> Toolbars & menus ->
    "The main toolbar" -> add "Swapped Metadata Fixer".
  • Once it is added to the plugin index, you will also be able to install/update it
    from Preferences -> Plugins -> "Get new plugins".

Usage
Click the toolbar button, keep "Repair calibre library", choose the scope, and press
"Check". Only the books that are wrong are listed. Review (double-click to edit;
yellow rows come unticked), then press "Apply selected". There is a built-in Help
button (full explanation of every option) and a CSV export.

Safety
  • Nothing is changed until you press Apply.
  • When rewriting an .epub it first saves a copy of the original under
    "_backups_SwappedMetadataFixer" inside your library.
  • Please make your own backup of the library the first time, just in case.

License: free to use. Feedback and example books welcome — if you hit a case
it does not detect or a wrong proposal, post the real title and author and I will
look into it.

Version history
  • 4.35 — current release. Undo: every Apply now saves a per-session backup (original .epub and/or the previous record title/author); a "Backups"
    button lets you Restore a session or Delete a backup when you're done.
  • 4.33-4.34 — toolbar button uses the plugin's actual name (easier to find in the toolbar list); toned-down read-only report prompt; readable cell
    highlighting on dark themes; progress bar moves during the preparing phase too.
  • 4.30-4.32 — defensive optional imports (loads even if a Qt class is missing in some calibre builds); optional EpubLibre helper (if an EPL-Id
    custom column exists, EPL books default to DB->epub; libraries without it are unaffected).
  • 4.29 — optional diagnostic Log (records the exact .epub path and where each value comes from) with a "View log" button; sort by clicking a
    column header.
  • 4.26 — only recover authors from the OPF file-as when it is in display form (avoids reversed "Lastname, First" results); fixes false author
    mismatches.
  • 4.2x — mismatch mode: per-row direction, per-field colours, bulk select/direction, click Note to apply only title or only author; recover the
    full author list from the OPF file-as for "AA. VV." anthologies; scope by ID; Close button; description lists the three tools.
  • 4.1x — false-positive hardening, ignore collection codes / multi-author / editors / punctuation / accents, ID column + search, parallel scanning
    with Stop, bilingual EN/ES UI, renamed to "Swapped Metadata Fixer".
  • 4.0 — first plugin release (it was a standalone app before).
Attached Files
File Type: zip SwappedMetadataFixer_plugin_v4.35.zip (50.2 KB, 2 views)

Last edited by Shark69; Today at 02:12 AM.
Shark69 is offline   Reply With Quote
Old 06-18-2026, 02:17 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,819
Karma: 64144480
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
This operation is already supported by Calibre Metadata editor in either the single mode (Icon on the left of the title for the selected book)
or in Bulk mode (selected group) Swap title and Author tick ( you can just tick and go, no other fields must be used)
theducks is offline   Reply With Quote
Advert
Old Yesterday, 02:53 AM   #3
Shark69
Zealot
Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.
 
Shark69's Avatar
 
Posts: 139
Karma: 493152
Join Date: Mar 2012
Location: Spain
Device: Kindle Oasis 2
You're absolutely right that calibre has "Swap title and author", both in the single-book editor and in bulk edit. But
that feature does something quite different from what this plugin is for, and it wouldn't solve the problem it targets:
  1. Calibre's swap is blind and manual. It just exchanges the Title and Author of whatever books you select — it doesn't tell you which books are actually wrong. In the real case this addresses, you have a library with thousands of books where only some are swapped, mixed in with correctly-cataloged ones. If you select a group and tick "Swap title and author", you'd corrupt all the correct ones too. The hard part is identifying the affected books — and that's exactly what the plugin does automatically.
  2. It reads the .epub's internal metadata, not just the record. The plugin opens each book's OPF (dc:title/dc:creator) and compares it against the calibre record to detect the genuinely-swapped ones. Calibre's swap only looks at the record.
  3. It recovers accents where the file preserves them. In these imports the swap usually also comes de-accented. The correct author (with accents) is normally kept in the OPF file-as/sort fields, and the accented title in the calibre:title_sort or NCX metadata, so the plugin restores those; a blind field swap would just keep the accent-less text. Where the file doesn't carry the accented form, that field is left as-is for you to touch up.
  4. It can fix the .epub interior too, not only the record — and it has a third mode that detects record/epub mismatches.
    Calibre's swap never touches the file.
  5. Everything is reviewable per book before applying: you see the proposed title/author, can edit it, pick only the title or only the author, and apply only the ones you tick — so correct books are never touched.

So it's not a replacement for the manual swap; it's an automated detect-and-fix tool for a specific kind of corruption (swapped + de-accented metadata baked into the files) that the built-in swap can't identify on its own. Thanks for raising it — it's a fair point worth clarifying in the thread.
Attached Files
File Type: zip SwappedMetadataFixer_plugin_v4.30.zip (47.3 KB, 3 views)

Last edited by Shark69; Yesterday at 05:43 AM.
Shark69 is offline   Reply With Quote
Old Yesterday, 09:21 PM   #4
dunhill
Wizard
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 1,123
Karma: 1502844
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
Excellent job!
dunhill is offline   Reply With Quote
Old Today, 02:09 AM   #5
Shark69
Zealot
Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.Shark69 ought to be getting tired of karma fortunes by now.
 
Shark69's Avatar
 
Posts: 139
Karma: 493152
Join Date: Mar 2012
Location: Spain
Device: Kindle Oasis 2
Thanks!!
Shark69 is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] AI Vision Metadata RelUnrelated Plugins 15 Yesterday 09:27 PM
[GUI Plugin] Metadata Sources Preview Comfy.n Plugins 1 05-20-2026 05:43 PM
Fetch Audio Metadata (GUI Plugin) PetrusV Plugins 2 05-01-2026 12:37 AM
[GUI Plugin] ePub Extended Metadata un_pogaz Plugins 63 04-29-2026 11:07 AM
[GUI Plugin] Clean Metadata WS64 Plugins 28 01-06-2022 08:09 PM


All times are GMT -4. The time now is 02:51 AM.


MobileRead.com is a privately owned, operated and funded community.