|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Zealot
![]() Posts: 100
Karma: 40
Join Date: Mar 2020
Location: Belgium (sorry, I am from the Walloon side of the country and I speak french only)
Device: PW3, Kobo Libra H2O
|
I just can't find any topic that would explain how to wipe out the "series" field from within a metadata source plugin. Sorry if I did miss the information...
If vol_serie contains a value, then the old series field for this (title, authors) gets overwritten. This is what I want. If vol_serie is set to "" then the old series field is not wiped out, leaving a "bad" information in the series field. Code:
mi = Metadata(vol_title, [vol_auteur])
mi.set_identifier('nsfr_id', self.nsfr_id)
mi.publisher = vol_editor
mi.isbn = vol_isbn
mi.tags = [vol_genre]
mi.source_relevance = self.relevance
mi.has_cover = bool(vol_cover_index)
if vol_dp_lgl:
mi.pubdate = vol_dp_lgl
mi.series = vol_serie
if vol_serie:
mi.series_index = vol_serie_seq
mi.language = "fra"
mi.comments = vol_comment_soup
if debug: self.log.info(self.who,"mi\n",mi,"\n")
self.plugin.clean_downloaded_metadata(mi)
self.result_queue.put(mi)
Is there an example somewhere in a metadata source plugin? Thanks in advance. |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,616
Karma: 28549044
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
IIRC you cannot. Since the metadata download system assumes a null return form a plugin means data for that field was not found.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Zealot
![]() Posts: 100
Karma: 40
Join Date: Mar 2020
Location: Belgium (sorry, I am from the Walloon side of the country and I speak french only)
Device: PW3, Kobo Libra H2O
|
Thanks Kovidgoyal, I was hopping for some better news, but that is ok :-)
Unless using some invisible characters such as "DEL", "NAK", "CAN", or a patern such as "DEL"*3, could be used to tell the system to force a wipeout... However, I have not examined if that would be possible and/or if I would be able to patch calibre for that... I guess the workaround to wipeout that field before invoking the metadata source plugin will become the rule... Last edited by lrpirlet; 12-30-2021 at 04:13 PM. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| In Edit Metadata, both "Number" field and "Next" button have letter N underlined. | droopy | Library Management | 6 | 05-24-2020 04:46 AM |
| Adding a field to the "Review Downloaded Metadata" screen | amyk0202 | Library Management | 4 | 04-22-2015 10:46 PM |
| Automatically populating metadata "tags" field from directory structure | battaglia01 | Calibre | 1 | 12-13-2012 10:23 PM |
| Issue Editing MetaData in "Series" Field | slammerkin | Library Management | 4 | 12-09-2012 02:33 AM |
| Bug? "Insert metadata as page at start of book" doesnt encode Comments field properly | rollercoaster | Calibre | 2 | 04-24-2010 11:40 PM |