LP#1306823: try to increase changes of fetching added content from the OL user/gmcharlt/lp1306823_fetch_more_covers_from_ol
authorGalen Charlton <gmc@esilibrary.com>
Fri, 11 Apr 2014 21:48:00 +0000 (14:48 -0700)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 11 Apr 2014 21:48:00 +0000 (14:48 -0700)
commit4eb3797733e6eddfaced73c780b2e2ea0c527459
tree9c24114c088bec7c99c92e7c6ae006071065461b
parente953ba1b9a3260d352f62ca7fa44fd45188e0308
LP#1306823: try to increase changes of fetching added content from the OL

For works that have more than one edition in the Open Library's
database, using 'isbn' as the search key can sometimes fail to
bring up the edition that has a cover image.  This patch instead
uses "isbn_10" or "isbn_13", depending on the length of the ISBN,
to try to retrieve the right edition.

This is known to work with ISBN 9264023607.  However, it is also
entirely possible that this works only because of a quirk in OL
as of the date of this patch; for example, neither "isbn_10"
nor "isbn_13" are listed as valid ID types in
https://openlibrary.org/dev/docs/api/read.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm