Capture back-face printing images for double-faced cards

Add a back_image_uri column to printings, populated during ingest from
a card's second card_faces image (only present for transform/MDFC/
reversible cards — split/adventure cards share one combined image and
correctly get ""). Plumb it through CardRef across every query path
(search, library, filters, deck contents) via the same printing row,
using a shared deterministic ORDER BY so front/back always come from
one printing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 20:54:55 -05:00
parent 342b8da797
commit 2ea3c56511
8 changed files with 114 additions and 18 deletions

View File

@@ -88,6 +88,9 @@ pub struct CardRef {
/// URL of a card image (Scryfall "normal" size) for one of its printings,
/// or empty if none is available.
pub image_uri: String,
/// URL of the *back face* image for the same printing (transform / modal
/// double-faced / reversible cards), or empty for single-faced cards.
pub back_image_uri: String,
}
/// A library row: a card the user owns, with quantity and its deck memberships.