View Single Post
Old 05-01-2010, 11:52 PM   #1
Junior Member
burliest began at the beginning.
burliest's Avatar
Posts: 3
Karma: 10
Join Date: May 2010
Device: iPhone in MetadataSource plugin

I started writing a metadata download plugin according to the documentation in the user manual, but I'm having some trouble with the value. It looks like a naming conflict between the author of the plugin and the author of the book. Has anyone else run into this and already solved it?

This code demonstrates the issue. The value for self.title is the book title, but the value for in this example is "Wrong Author" instead of the book author:

import traceback

from calibre.ebooks.metadata.fetch import MetadataSource

class AuthorConflictPlugin(MetadataSource):
    name = 'foo'
    author = 'Wrong Author'
    supported_platforms = ['windows']
    metadata_type = 'basic'

    def fetch(self):
            raise Exception(self.title,  # value is Wrong Author
        except Exception as e:
            self.exception = e
            self.tb = traceback.format_exc()
burliest is offline   Reply With Quote