diff --git a/backend/app/plex/imgcache.py b/backend/app/plex/imgcache.py index 6f7ba2e0..8eed4e1b 100644 --- a/backend/app/plex/imgcache.py +++ b/backend/app/plex/imgcache.py @@ -27,7 +27,8 @@ _CT_EXT = {ct: ext for ext, ct in _EXT_CT} # page's ≤224px poster at 2× DPR, the full art (1280px) a hero backdrop. A card is much smaller: a grid # poster is ~144px and a shelf's landscape art ~212px, so the `_sm` pair serves those at 1.33× DPR # (E31 S4e: cards fetched the 400 poster, 42 KB, and the 1280 art for a 212px picture). The browser -# picks between a pair itself (`srcset`, the frontend's `plexSrcSet`). +# picks between a pair itself (`srcset`, built by the frontend's `lib/plexImage` cardImage, whose +# widths plexImage.contract.test holds to these). SIZES = { "thumb": (400, 600), "thumb_sm": (240, 360), diff --git a/frontend/src/components/PlexLibraryPicker.tsx b/frontend/src/components/PlexLibraryPicker.tsx index aa480f8b..3e042133 100644 --- a/frontend/src/components/PlexLibraryPicker.tsx +++ b/frontend/src/components/PlexLibraryPicker.tsx @@ -5,6 +5,7 @@ import { qk } from "../lib/queryKeys"; import { api, type PlexCard } from "../lib/api"; import { useDebounced } from "../lib/useDebounced"; import { LoadingState } from "./ui/QueryState"; +import { cardImage } from "../lib/plexImage"; // A debounced library search-and-pick list, shared by the "Add title" panel (PlexCollectionView) and // the "New collection" first-title panel (plexBrowseLists) — both search the library the same way and @@ -49,7 +50,7 @@ export default function PlexLibraryPicker({ {results.map((c) => (