![]() |
#1 |
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Jul 2018
Device: PocketBook Touch HD
|
Metadata plugin: How to set "author_sort_map"?
I'm developer of a metadata plugin.
My metadata source delivers author names in the style "lastname, firstname". I'd like to have it in Calibre as "firstname lastname" without loosing the already given correct sort order. So I do not want to simply use a regex to switch author names to "firstname lastname" and let Calibre afterwards guess what's the correct sort order, as I obviously already have it. As far as I understand I could use "author_sort_map" to avoid the guessing, but regardless what I try, the dict gets ignored. I've added "author_sort_map" to the "touched_fields": Code:
touched_fields = frozenset(['title', 'authors', 'author_sort_map','languages',.... Code:
mi = Metadata( "Example Book Title", ['Anna Nym', 'Siggi Schwarz'] ) mi.author_sort_map = { "Anna Nym": "It Works", "Siggi Schwarz": "Yippie" }
But what I get is the usual:
Any hints why author_sort_map is ignored? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,185
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just set author_sort, it can contain multiple autors separated by &
|
![]() |
![]() |
![]() |
#3 |
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Jul 2018
Device: PocketBook Touch HD
|
This works, thank you very much!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to wipe out "series" field from within my metadata source plugin | lrpirlet | Development | 2 | 12-30-2021 03:08 PM |
Plugin "Read MP3 Audiobook Metadata" error installing | gandoe | Plugins | 1 | 08-22-2021 12:36 PM |
What to do about "Failed to set metadata for the PDF format" on export? | halloleo | Library Management | 5 | 12-31-2020 02:43 PM |
Calibre 4.0 - qt.qpa.pluginCould not load the Qt platform plugin "xcb" in "" even tho | PaceyIV | Calibre | 3 | 10-04-2019 08:58 PM |
is it possible to set mobipocket "subject" metadata from calibre? | rheostaticsfan | Calibre | 3 | 05-20-2010 08:44 AM |