Skip to content

Conversation

@Teagan42
Copy link
Contributor

What

  • cache poster and background artwork for every normalized identifier collected by _get_media_data
  • reuse a shared helper for rating-key lookups so poster/background endpoints populate caches for alternate IDs
  • add a regression test that ensures artwork requests via IMDb IDs reuse cached data instead of refetching
  • bump the project version metadata to 2.0.20 across manifests and lock file

Why

  • requests for posters/backgrounds using secondary identifiers were missing cache hits because artwork was stored only under the rating key
  • sharing caching logic across call sites avoids duplication and keeps rating-key compatibility while expanding coverage

Affects

  • media artwork helper routines in mcp_plex.server.media
  • media poster/background resources in mcp_plex.server.tools.media_library
  • project metadata in pyproject.toml, docker/pyproject.deps.toml, and uv.lock
  • additional server media resource tests

Testing

  • uv run ruff check .
  • uv run pytest

Documentation

  • none required

https://chatgpt.com/codex/tasks/task_e_68ef552604708328a583c917cca52c9a

Include version bump to 2.0.20 to align packaging metadata with caching updates.
@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
mcp_plex/loader
   __init__.py1831194%139, 209, 323–325, 327, 416–435
   qdrant.py202399%343–349
   samples.py41393%55–57
mcp_plex/loader/pipeline
   enrichment.py5207586%234, 255–261, 314, 319, 350, 352, 359, 361, 461, 482, 502, 510–512, 515–519, 522–524, 532–537, 545, 596–597, 621, 679–680, 696, 723, 730, 732, 736, 788, 806, 818, 847, 853, 856–864, 890, 893–895, 912–914, 934–937, 941, 955–959, 981, 983, 986–988
   ingestion.py1551392%82, 133–153, 188, 225, 241, 334, 340, 358
   orchestrator.py95595%60, 136, 165, 188–189
   persistence.py130993%123, 165–166, 174, 185, 189–191, 240
mcp_plex/server
   __init__.py3962195%124, 130–133, 152, 158–160, 256, 318, 336–337, 345, 420, 514, 544, 563, 570, 589, 702
   cli.py75297%44, 96
   config.py83199%63
   media.py2602491%144, 175, 191, 232–238, 247–250, 288–295, 318, 352, 358, 364, 382–383
mcp_plex/server/tools
   media_library.py3401296%206, 579, 677, 696, 747, 798, 869, 959–963
TOTAL301117994% 

Tests Skipped Failures Errors Time
207 0 💤 0 ❌ 0 🔥 1m 24s ⏱️

@Teagan42 Teagan42 merged commit 64b824b into main Oct 15, 2025
4 checks passed
@Teagan42 Teagan42 deleted the codex/update-media-caching-to-support-multiple-identifiers branch October 15, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants