New metadata API in 0.8 questions
Rather than hijack Idolse's thread I'll ask some questions here and it might make it easier for others to find too in future.
(1) Is there a way in the identify() method of your Source derived plugin of knowing that you have been called interactively from the fetch metadata button on the edit metadata dialog versus non-interactively being called in a batch?
I ask because with Goodreads the search results they will present for a title/author match are a single rolled up record which is from their own "best match" of their metadata sources, but they also have a link to all the individual editions. Sometimes their "best match" isn't the most useful edition (e.g. it is for an audio book, or has no cover etc). So I was thinking it might be nice to actually take the extra query hop in the case of fetching metadata interactively to grab the top few editions (they are sorted) to allow the user to make a choice.
However if the plugin is in the mode of being called as part of a background job, there is no point in slowing it down further by doing the extra query. If I could detect where I was being called from I could optimise for this.
(2) Is it permissible to return multiple covers in the result queue from download_cover()? I ask because it seems the plugins in Calibre are coded to return only a single cover?
Again I'm thinking that "if" I did the extra hop, I could cache the image urls of the top x editions and return different covers for them if available.
If the user has a specific ISBN or Goodreads Id already at the time they do the search, none of this extra edition/covers stuff applies, it is only for title/author searches.
|