|
|
#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,720
Karma: 28549306
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Just set author_sort, it can contain multiple autors separated by &
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Jul 2018
Device: PocketBook Touch HD
|
This works, thank you very much!
|
|
|
|
![]() |
|
Similar Threads
|
||||
| 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 04:08 PM |
| Plugin "Read MP3 Audiobook Metadata" error installing | gandoe | Plugins | 1 | 08-22-2021 01:36 PM |
| What to do about "Failed to set metadata for the PDF format" on export? | halloleo | Library Management | 5 | 12-31-2020 03:43 PM |
| Calibre 4.0 - qt.qpa.pluginCould not load the Qt platform plugin "xcb" in "" even tho | PaceyIV | Calibre | 3 | 10-04-2019 09:58 PM |
| is it possible to set mobipocket "subject" metadata from calibre? | rheostaticsfan | Calibre | 3 | 05-20-2010 09:44 AM |