Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50069

metadata plugin how to set custom fields

$
0
0
I'm trying to make my own personal metadata plugin but I'm not able to find out how to set a custom column value. I can do Metadata.authors and Metadata.tags etc.. but not metadata_info.set_user_metadata("#testColumn", "testvalue"). Any ideas how I can achive this without dipping into the db?

Code:

    def identify(self, log, result_queue, abort, title=None, authors=None, identifiers={}, timeout=30):
        log(f"Searching for metadata: {title}")

        metadata_info = Metadata("test123")
        metadata_info.authors = ["Unknown Author", "Another Author"]
        metadata_info.tags = ['Example', 'Calibre']
        metadata_info.comments = 'This is a test.'
        metadata_info.set_user_metadata('#testColumn', "testvalue")
       
        result_queue.put(metadata_info)


Viewing all articles
Browse latest Browse all 50069

Latest Images

Trending Articles



Latest Images