Just got back into developing this plugin. I've got the plugin working pretty well for social metadata/cover download, but I'd like to move it to the discovery phase as discussed previously, as right now the has_cover lookup (pretty sure it's this function) bombards Overdrive with potentially dozens of simultaneous requests for book title variations and ISBNs - since this is done simultaneously it's done too late to cache the results properly and avoid abusing the server.
I've got the plugin using the new set_identifier function to set the id for Overdrive in the identifiers table, but right now that's not something that's available for use in fetch.py or covers.py, both still rely on calling ISBN the old fashioned way, and it wasn't readily apparent to me how to change either of those to check for the existence of some other type of identifier.
I know a lot of this stuff using identifiers isn't quite ready for prime-time use and is tied to the larger metadata enhancements targeted for a later release. Is there something simple that can be done with the current code easily, or is this something I should wait for a while longer?
Ideally I'd like the logic to be something like this:
- Check Overdrive during the discovery phase with the configured Title/Author (overdrive Identifier is optional if found in the metadata)
- Populate the basic metadata available from this initial lookup (currently Title/Subtitle, Authors, Series/Series Index, Publisher, Cover URL, social metadata URL, Overdrive Identifier) - some of this would just go into a cache based on Overdrive Identifier (vs. ISBN which is used today).
- Get the Cover URL from the cache if Overdrive is configured for covers.
- Get Social Metadata from the url in the cache if configured for Social Metadata (tags, description, pub date, ebook ISBN, language)