View Full Version : Small Change to Metadata Source plugin API


kovidgoyal
04-25-2011, 01:18 PM
Just a heads up, if you have written a metadata source plugin, the signature for the get_book_url method has changed. It now needs to return (identifier_type, identifier_val, URL) instead of just URL.

So for example the amazon plugin now does



def get_book_url(self, identifiers):
asin = identifiers.get('amazon', None)
if asin is None:
asin = identifiers.get('asin', None)
if asin:
return ('amazon', asin, 'http://amzn.com/%s'%asin)

kiwidude
04-25-2011, 02:55 PM
For the book details pane to provide hyperlink ids by the looks of it?

Very cool, I like the convenient way to jump to the Goodreads book (which you otherwise need a menu item in the Goodreads Sync plugin to do).

kovidgoyal
04-25-2011, 02:55 PM
Yeah, that was the motivation :)