Skip to content

Conversation

@Teagan42
Copy link
Contributor

@Teagan42 Teagan42 commented Oct 6, 2025

What

  • type the ingestion stage and batch containers with plexapi server and video classes
  • fetch movies and shows via library sections and iterate seasons/episodes through the typed API
  • refresh the ingestion unit test to assert section usage and typed batches
  • bump project version to 1.0.3 and sync dependency manifests

Why

  • align ingestion with the concrete plexapi interfaces so downstream enrichment receives correctly typed media objects
  • verify that ingestion targets the intended Plex library sections

Affects

  • loader pipeline ingestion and channel helpers
  • ingestion unit tests and project metadata versions

Testing

  • uv run pytest

Documentation

  • none required

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

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
mcp_plex/loader
   __init__.py3881895%84–91, 165, 255–260, 621, 736–738, 740, 826–845, 1198
mcp_plex/loader/pipeline
   __init__.py16756%57–62, 68
   channels.py61395%21–23
   enrichment.py4396086%248, 253, 284, 286, 293, 297, 401, 422, 442, 450–452, 459–462, 465–467, 475, 538, 594, 617, 621, 623, 653, 671, 683, 712, 718, 721–729, 755, 758–760, 777–779, 799–802, 806, 820–826, 848, 850, 853–855
   ingestion.py1031189%84, 133–153, 180, 209, 215, 246
   orchestrator.py92595%48, 126, 155, 178–179
   persistence.py129993%112, 154–155, 165, 176, 180–182, 231
mcp_plex/server
   __init__.py6142995%43–44, 119–120, 148, 252, 256, 277–280, 297, 362, 365, 402, 420–421, 458, 1109, 1131–1137, 1173, 1191, 1196, 1214, 1338, 1375
   __main__.py440%3–8
   config.py48785%50, 52–55, 65, 76
TOTAL210515393% 

Tests Skipped Failures Errors Time
130 0 💤 0 ❌ 0 🔥 1m 8s ⏱️

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 191 to +195
self._items_ingested,
)

shows_attr = getattr(plex_server, "shows", [])
shows_source = shows_attr() if callable(shows_attr) else shows_attr
shows = list(shows_source)
shows_section = library.section("TV Shows")
shows: list[Show] = list(shows_section.all())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle Plex servers without default movie/show section names

The ingestion flow now calls library.section("Movies") and library.section("TV Shows") unconditionally. Plex servers often rename or omit these sections, and Library.section() raises NotFound when the name does not exist, so ingestion will now fail outright for any server that does not use the default names or lacks one of the sections. The previous implementation tolerated missing attributes by returning an empty list, so this is a regression in robustness. Consider iterating over library.sections() by type or catching NotFound so custom libraries still ingest movies or episodes.

Useful? React with 👍 / 👎.

@Teagan42 Teagan42 merged commit 1d45109 into main Oct 6, 2025
4 checks passed
@Teagan42 Teagan42 deleted the codex/update-ingestion.py-for-plex-api-integration branch October 6, 2025 23:04
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