View Single Post
Old 08-16-2025, 05:13 AM   #1
yamusing
Enthusiast
yamusing began at the beginning.
 
Posts: 49
Karma: 10
Join Date: Jul 2019
Device: none
metadata plugin how to set custom fields

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)
yamusing is offline   Reply With Quote