|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Connoisseur
![]() Posts: 96
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,345
Karma: 27182818
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 |
Connoisseur
![]() Posts: 96
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 03:13 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 03:46 AM |
Adding a field to the "Review Downloaded Metadata" screen | amyk0202 | Library Management | 4 | 04-22-2015 09:46 PM |
Automatically populating metadata "tags" field from directory structure | battaglia01 | Calibre | 1 | 12-13-2012 09:23 PM |
Issue Editing MetaData in "Series" Field | slammerkin | Library Management | 4 | 12-09-2012 01:33 AM |
Bug? "Insert metadata as page at start of book" doesnt encode Comments field properly | rollercoaster | Calibre | 2 | 04-24-2010 10:40 PM |