Keep remote watchlists working when Plex refuses the RSS feed URL - #199
Merged
Brandon-Haney merged 1 commit intoJul 29, 2026
Merged
Conversation
Plex serves watchlist RSS from rss.plex.tv/<uuid>. That host began returning 401 without a token and 404 with one, so remote watchlist data stopped refreshing and runs fell back to increasingly old cached items. The same feed stays reachable via discover.provider.plex.tv/rss/<uuid>, which redirects to a presigned copy of the identical document. Plex's own settings page still generates rss.plex.tv URLs, so the configured URL remains primary and the mirror is only tried when Plex refuses it. If the primary host starts working again, runs return to it with no config change. Also in `_fetch_rss_titles`: - Send X-Plex-Token, scoped to Plex hosts so a user-supplied feed URL can't send the token to an arbitrary domain. The redirect to storage is followed as a separate request without it, since the presigned URL carries its own credentials. - Stop retrying 401/403/404. Those are deterministic, and three attempts with backoff only delayed the fallback. - Log the fallback at INFO and the per-attempt detail at DEBUG. A recovered fetch is not an error and no longer reports as one. `_load_rss_cache()` returned cached items at any age with no upper bound, which is why the feed could go stale for days without it being obvious. It still returns the data, because losing every remote watchlist item would be worse, but past RSS_CACHE_STALE_HOURS it warns that the feed is unreachable and changes are not being picked up. Tests cover URL derivation, token scoping, primary-first ordering, no-retry on auth failures, retained retries for transient errors, redirect handling, and the cache paths.
StudioNirin
approved these changes
Jul 29, 2026
Brandon-Haney
added a commit
that referenced
this pull request
Jul 30, 2026
Two fixes to the image publishing workflow, both surfaced while bringing the rolling :dev channel online in #200. Docker v2 manifests. Images are pushed with OCI media types, and Unraid's update check requests only Docker media types, so the registry returns 404 for the manifest and the container reports "not available" rather than an update status. Verified against the registry with Docker-only Accept headers: studionirin/plexcache-d:dev -> 404 (application/vnd.oci.image.manifest.v1+json) studionirin/plexcache-d:latest -> 200 (application/vnd.docker.distribution.manifest.v2+json) `provenance: false` was already set and isn't sufficient on its own, so this also disables SBOM attestation and sets oci-mediatypes=false via the image exporter, which puts buildx back on a plain Docker v2 manifest. Pulling was never affected — Docker handles OCI fine — so this only changes what the update check can read. This matters most on a release: users whose update status reads "not available" are never told a new version exists. Cancel superseded builds. #199 and #200 merged 13 seconds apart. Both started a build, and the older commit's run finished two seconds later, so it won the :dev tag and left it pointing at a commit missing the newer merge. A concurrency group keyed on the ref cancels the stale run so :dev always tracks the newest push. Release builds use their own ref and are unaffected. No change to which events publish or to the tags produced.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's happening
Plex serves watchlist RSS from
rss.plex.tv/<uuid>. On 28 Jul 2026 that host started rejecting requests. My own instance went from clean fetches to failures inside a four hour window:RSS feed contains 50 items, no errorsWhat it returns now:
The 404 applies to every feed id, including invented ones, so it isn't specific to one account's feed. Everything else on the same token keeps working in the same run: user tokens load, OnDeck runs, and API based watchlists fetch normally.
The same feed is still reachable at
discover.provider.plex.tv/rss/<uuid>, which redirects to a presigned copy of the identical document. I confirmed it is the same feed rather than a coincidence:plex-rss-feeds.s3.../e/<feed-id>.xmlrss.plex.tvearlier the same morning: 50 items, 50 identical titles, no differencesWhat this PR does
Plex's settings page still generates
rss.plex.tvURLs, so the configured URL stays primary and the other endpoint is only tried when Plex refuses it. If the primary host starts working again, runs go back to it with no config change and nothing to undo. The cache entry is keyed to the configured URL for the same reason.Also in
_fetch_rss_titles:X-Plex-Token, scoped to Plex hosts.remote_watchlist_rss_urlis user supplied, so this keeps the token from being attached to an arbitrary domain. The redirect to storage is followed as a separate request without it, since the presigned URL carries its own credentials._load_rss_cache()returned cached items at any age. It still returns them, since losing every remote watchlist item would be worse, but pastRSS_CACHE_STALE_HOURS(24h) it now warns that the feed has been unreachable and remote changes are not being picked up. This is what makes a prolonged outage visible rather than quietly serving old data.At normal verbosity the whole thing is one line:
Scope
Affects any install with
remote_watchlist_rss_urlset. Installs that don't use remote watchlists are unaffected. No settings changes are required and no template or UI changes are included, since the URL Plex hands out is still the one to paste in.Testing
28 new tests in
tests/test_plex_rss_fallback.pycovering URL derivation, token scoping, primary first ordering, no retry on auth failures, retained retries for transient errors, redirect handling, and the cache paths. Full suite passes.To verify manually:
--verboseto see the ordering: primary attempted first, one 404, no retry, then the fallback.remote_watchlist_rss_urlat a non Plex URL that 404s and confirm no fallback is attempted and no token is sent.