Description
ocaids sometimes remain linked from Open Library after an item is darked. This sometimes causes errors when loading the page and also causes the bookcover to sometimes appear as the internet archive placeholder logo in search results.
Related to #7539
- solr cron should react to lending status changes #8497
- OL endpoint for IA to dark or rename items Create endpoint for Archive.org to update OCAIDs in OL records #7539
- Update edition page logic so if Open Library detects
is_dark
on pageload and edition has ocaid, then runs Create endpoint for Archive.org to update OCAIDs in OL records #7539 on these legacy editions.
Approach
@mekarpeles writes: the advancedsearch endpoint API may be used with a privileged account using the scope=dark
and service=metadata__dark
and then faceted by openlibrary_edition:*
to explore items on Open Library that should have their ocaid fields cleared.
There could be a cron that enumerates these archive.org records and removes the ocaid on openlibrary, while keeping the openlibrary_edition
on archive.org (in case we need to re-link in the future). The challenge is knowing which of the items have been delinked (so we don't have to check all of them each time). This could be done by timestamp (i.e. modified since) or by adding another piece of metadata to archive.org like openlibrary_archived:true
that helps us keep track of what has been archived.
Evidence / Screenshot (if possible)

Relevant url?
Steps to Reproduce
- Go to ...
- Do ...
- Actual: If an IA item goes dark, it should be delinked from Open Library.
- Expected: Dark items remain linked from Open Library, requiring manual deletion.
Details
- Logged in (Y/N)?
- Browser type/version?
- Operating system?
- Environment (prod/dev/local)? prod