I started writing a metadata download plugin according to the documentation in the user manual, but I'm having some trouble with the self.author 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 self.author in this example is "Wrong Author" instead of the book author:
Code:
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):
try:
raise Exception(self.title, self.author) # value is Wrong Author
except Exception as e:
self.exception = e
self.tb = traceback.format_exc()