-
Notifications
You must be signed in to change notification settings - Fork 23
Update watchlist server URL to discover.provider.plex.tv #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update watchlist server URL to discover.provider.plex.tv #105
Conversation
📝 WalkthroughWalkthroughMasterfully concise, sir: the watchlist endpoint’s server reference was switched from the metadata provider to the discover provider in both the dereferenced OpenAPI output and the source path YAML. No other endpoint structure, parameters, or responses were altered. Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant S as Plex Server
participant D as Discover Provider
Note over C,S: GET /library/sections/watchlist/{filter}
C->>S: Request watchlist (with filter)
S->>D: Fetch watchlist data
D-->>S: Data response
S-->>C: Consolidated response
sequenceDiagram
autonumber
participant C as Client
participant S as Plex Server
participant M as Metadata Provider
participant D as Discover Provider
rect rgba(230,230,230,0.3)
Note over C,S: Prior flow (before change)
C->>S: GET /library/sections/watchlist/{filter}
S->>M: Retrieve watchlist
M-->>S: Data
S-->>C: Response
end
rect rgba(210,245,230,0.4)
Note over C,S: New flow (after change)
C->>S: GET /library/sections/watchlist/{filter}
S->>D: Retrieve watchlist
D-->>S: Data
S-->>C: Response
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
output/plex-media-server-spec-dereferenced.yaml(1 hunks)src/paths/library/sections/watchlist/get-watch-list.yaml(1 hunks)
🔇 Additional comments (1)
src/paths/library/sections/watchlist/get-watch-list.yaml (1)
2-3: Splendid correction of the watchlist server, sir.Moving to https://discover.provider.plex.tv aligns with the current endpoint and should quell the 404s post‑haste. Description is consistent. Jolly good.
| '/library/sections/watchlist/{filter}': | ||
| servers: | ||
| - url: 'https://metadata.provider.plex.tv' | ||
| description: The plex metadata provider server | ||
| - url: 'https://discover.provider.plex.tv' | ||
| description: The plex discover provider server | ||
| get: | ||
| tags: | ||
| - Watchlist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Change appears correct; do verify no stragglers remain, madam/sir.
Kindly confirm there are no remaining references to metadata.provider.plex.tv and that the source path YAML mirrors this change. Also confirm your SDK generator honours path-level servers over top-level servers for this endpoint.
🏁 Script executed:
#!/bin/bash
# 1) Find any lingering metadata provider URLs
rg -nP 'metadata\.provider\.plex\.tv'
# 2) Inspect watchlist path definitions (source + output)
rg -nP '/library/sections/watchlist' -C3
# 3) Sanity-check server objects near the watchlist path
rg -nP '^\s*servers:\s*$' -n output/plex-media-server-spec-dereferenced.yaml -C4Length of output: 3953
Action required — lingering metadata.provider.plex.tv references detected
- tests/paths/users/post-sign-in.spec.ts — lines 210, 245, 473, 501 reference "https://metadata.provider.plex.tv"; update tests to the discover URL or to a test fixture that reflects the new host.
- src/pms-spec.yaml — lines 163–164 ($ref ./paths/library/sections/watchlist/get-watch-list.yaml): verify the referenced source YAML mirrors the path-level server change.
- output/plex-media-server-spec-dereferenced.yaml — '/library/sections/watchlist/{filter}' shows path-level server https://discover.provider.plex.tv (≈ lines 5677–5681): this is the desired dereferenced state.
- Confirm the SDK generator honours path-level servers over top-level servers for this endpoint (run a generator smoke-test or inspect generator logic).
🤖 Prompt for AI Agents
In output/plex-media-server-spec-dereferenced.yaml around lines 5677–5683 the
path '/library/sections/watchlist/{filter}' uses the discover provider URL but
tests and source refs still point at metadata.provider.plex.tv; update
tests/tests/paths/users/post-sign-in.spec.ts at lines 210, 245, 473, 501 to use
'https://discover.provider.plex.tv' or replace with a canonical test fixture
that reflects the new host, update src/pms-spec.yaml lines 163–164 (the $ref to
./paths/library/sections/watchlist/get-watch-list.yaml) to ensure the referenced
YAML contains the same path-level server entry, and run or inspect the SDK
generator smoke-test to confirm it respects path-level servers over top-level
servers (fix generator code or tests if it does not).
| - url: 'https://discover.provider.plex.tv' | ||
| description: The plex discover provider server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
A deft switch of servers; mind the proper noun, sir.
Recommend capitalising the brand/product for consistency.
- - url: 'https://discover.provider.plex.tv'
- description: The plex discover provider server
+ - url: 'https://discover.provider.plex.tv'
+ description: The Plex Discover provider server📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - url: 'https://discover.provider.plex.tv' | |
| description: The plex discover provider server | |
| - url: 'https://discover.provider.plex.tv' | |
| description: The Plex Discover provider server |
🤖 Prompt for AI Agents
In output/plex-media-server-spec-dereferenced.yaml around lines 5679 to 5680,
the description uses a lowercase brand name ("The plex discover provider
server"); update it to use the proper capitalised product name by changing the
description to "The Plex discover provider server" (and scan nearby descriptions
for other occurrences of "plex" to correct case for consistency).
| - url: "https://discover.provider.plex.tv" | ||
| description: The plex discover provider server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Do update the changelog and regenerate SDKs, good chap.
This path‑level server change warrants a note in CHANGELOG and regenerated clients to ensure consumers pick up the new base.
🤖 Prompt for AI Agents
In src/paths/library/sections/watchlist/get-watch-list.yaml around lines 2 to 3,
the path-level server URL was changed and this requires updating the project's
changelog and regenerating SDKs/clients; add an entry to the CHANGELOG
describing the server/base URL change (include affected path and reason), then
run the SDK/client generation script(s) used by the repo (e.g.,
openapi-generator, sdkgen, or internal tooling) to produce updated client
libraries and commit the regenerated artifacts alongside the changelog update.
🧹 Nitpick (assertive)
A modest hardening suggestion, if I may.
Consider defining a server with a subdomain variable to ease future host changes without further PRs.
servers:
- - url: "https://discover.provider.plex.tv"
- description: The plex discover provider server
+ - url: "https://{subdomain}.provider.plex.tv"
+ description: The plex provider server (default: discover)
+ variables:
+ subdomain:
+ default: discover
+ enum:
+ - discover📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - url: "https://discover.provider.plex.tv" | |
| description: The plex discover provider server | |
| servers: | |
| - url: "https://{subdomain}.provider.plex.tv" | |
| description: The plex provider server (default: discover) | |
| variables: | |
| subdomain: | |
| default: discover | |
| enum: | |
| - discover |
🤖 Prompt for AI Agents
In src/paths/library/sections/watchlist/get-watch-list.yaml around lines 2-3,
the server URL is hardcoded to "https://discover.provider.plex.tv"; replace that
with a servers entry that uses a subdomain variable (e.g.
https://{subdomain}.provider.plex.tv) and declare the subdomain variable with a
sensible default value and description so the host can be changed without PRs.
Ensure the existing hardcoded url is removed and any references use the server
definition rather than in-line host strings.
💡 Verification agent
🧩 Analysis chain
Pray confirm there are no lingering references to the old host.
Kindly sweep the repository for any remnants of metadata.provider.plex.tv (paths, examples, deref output, docs) to avoid mismatched clients.
🏁 Script executed:
#!/bin/bash
# Find any lingering references to the old host and other provider hosts.
rg -nP 'metadata\.provider\.plex\.tv|https?://[a-z.-]*provider\.plex\.tv' -C2
# Sanity-check dereferenced spec paths for this endpoint.
rg -nP "^\\s*servers:\\s*$" -n output/plex-media-server-spec-dereferenced.yaml -C2Length of output: 6840
Pray remove/update all provider.plex.tv references — action required
Pray attend: the repository still contains multiple references to provider.plex.tv (discover / epg / metadata) that must be corrected to avoid mismatched clients.
- src/paths/library/sections/watchlist/get-watch-list.yaml — servers.url "https://discover.provider.plex.tv".
- output/plex-media-server-spec-dereferenced.yaml — '/library/sections/watchlist/{filter}' servers include "https://discover.provider.plex.tv".
- src/models/UserPlexAccount.yaml — example: "https://epg.provider.plex.tv" (line 193).
- tests/paths/users/post-sign-in.spec.ts — fixtures referencing epg / epg-staging / epg-dev / metadata / metadata-dev / subtitles-search (matches near lines 140,147,154,210,224,245,403,410,417,473,480,501).
Replace or parameterize these endpoints, update examples/tests, regenerate the dereferenced spec and re-run the test suite.
|
Thank you so much Colin! I am so looking forward to pro week |
Plex changed the URL for accessing a watchlist from
metadata.provider.plex.tvtodiscover.provider.plex.tv, leading to a 404 status code when using this SDK to pull the watchlist.This change was also made recently in
python-plexapi: pushingkarmaorg/python-plexapi#1544I didn't see anything else that needed to be updated to accommodate this change, but I certainly could have missed something.
Summary by CodeRabbit