View Single Post
Old 12-27-2021, 03:41 PM   #1
lrpirlet
Connoisseur
lrpirlet began at the beginning.
 
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
Question How to wipe out "series" field from within my metadata source plugin

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)
What kind of code should I write?
Is there an example somewhere in a metadata source plugin?

Thanks in advance.
lrpirlet is offline   Reply With Quote