feat(tracker): show card thumbnails, set logos and pack art #8

Merged
freydis merged 2 commits from feat/card-images into main 2026-10-15 14:59:07 +02:00
Owner

Summary

Adds card thumbnails, set logos and pack art. The images are taken from flibustier's
pokemon-tcg-exchange (thumbnails, logos) and
pokemon-tcg-pocket-database (pack art) repos.

  • Storage: a private MinIO bucket, set up the same way as dex-binder and manga-lib (S3_* env vars, app reaches MinIO over minio-net). No images are shown when S3_ENDPOINT is unset.
  • Serving: a /images/<key> proxy. It only serves thumbnails/, logos/ and packs/ keys, lets browsers cache for 30 days and supports If-None-Match. If a set has no logo in the current language, the English one is served.
  • Filling the bucket: manage.py sync_card_images (--sets, --force, --dry-run) uploads only the images that are missing, 8 at a time. Eight packs have different names upstream; PACK_SOURCE_NAMES maps them.
  • UI:
    • Set logos on the home set cards and the set detail header.
    • A Table/Grid toggle on set detail. Missing cards are greyed out, clicking a tile toggles it like a table row, and the browser remembers the choice.
    • A generic card placeholder when a thumbnail fails to load.
    • Pack art on the pack list.
  • German labels for the new buttons, README docs, and dev logging that keeps botocore quiet.

All 4,097 cards, 29 packs and 22 sets have images upstream. German logos exist for A1–B1; newer sets use English.

Deploy

  1. Add S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY to .env.
  2. Join the web service to the external minio-net network.
  3. Run python manage.py sync_card_images, and again after importing new sets.

Testing

  • 68 tests pass, 24 of them new: bucket keys, the proxy (botocore Stubber), and the sync command (fake S3 client).
  • black, isort, pylint and djlint pass.
  • Not yet tested against a real MinIO or in a browser.
## Summary Adds card thumbnails, set logos and pack art. The images are taken from flibustier's [pokemon-tcg-exchange](https://github.com/flibustier/pokemon-tcg-exchange) (thumbnails, logos) and [pokemon-tcg-pocket-database](https://github.com/flibustier/pokemon-tcg-pocket-database) (pack art) repos. - **Storage:** a private MinIO bucket, set up the same way as dex-binder and manga-lib (`S3_*` env vars, app reaches MinIO over `minio-net`). No images are shown when `S3_ENDPOINT` is unset. - **Serving:** a `/images/<key>` proxy. It only serves `thumbnails/`, `logos/` and `packs/` keys, lets browsers cache for 30 days and supports `If-None-Match`. If a set has no logo in the current language, the English one is served. - **Filling the bucket:** `manage.py sync_card_images` (`--sets`, `--force`, `--dry-run`) uploads only the images that are missing, 8 at a time. Eight packs have different names upstream; `PACK_SOURCE_NAMES` maps them. - **UI:** - Set logos on the home set cards and the set detail header. - A Table/Grid toggle on set detail. Missing cards are greyed out, clicking a tile toggles it like a table row, and the browser remembers the choice. - A generic card placeholder when a thumbnail fails to load. - Pack art on the pack list. - German labels for the new buttons, README docs, and dev logging that keeps botocore quiet. All 4,097 cards, 29 packs and 22 sets have images upstream. German logos exist for A1–B1; newer sets use English. ## Deploy 1. Add `S3_ENDPOINT`, `S3_BUCKET`, `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY` to `.env`. 2. Join the web service to the external `minio-net` network. 3. Run `python manage.py sync_card_images`, and again after importing new sets. ## Testing - 68 tests pass, 24 of them new: bucket keys, the proxy (botocore Stubber), and the sync command (fake S3 client). - black, isort, pylint and djlint pass. - **Not yet tested against a real MinIO or in a browser.**
feat(tracker): show card thumbnails, set logos and pack art
All checks were successful
CI / Lint & Test (push) Successful in 41s
CI / Lint & Test (pull_request) Successful in 42s
CI / Docker build & push (pull_request) Successful in 39s
CI / Deploy (pull_request) Has been skipped
CI / Docker build & push (push) Successful in 45s
CI / Deploy (push) Has been skipped
40b98668e0
Images live in a private S3-compatible bucket (MinIO) and are served
through a new /images/ proxy that only accepts thumbnail, logo and pack
keys, streams with a 30-day Cache-Control and honours If-None-Match.
Localized set logos fall back to English when a set has none in the
active language. Images are disabled when S3_ENDPOINT is unset.

The new sync_card_images command fills the bucket from flibustier's
pokemon-tcg-exchange (thumbnails, logos) and pokemon-tcg-pocket-database
(pack art) repos, uploading only keys that are missing.

- Set logos on the home set cards and the set detail header
- Table/grid toggle on the set detail page; missing cards are greyed
  out, tiles toggle collection like table rows, and the choice is
  remembered per browser
- Generic card placeholder when a thumbnail fails to load
- Pack art on the pack list
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
freydis/tcgp-tracker!8
No description provided.