Skip to content

Fix Plex sink username filtering#1799

Merged
IgnisDa merged 1 commit into
mainfrom
issue-1798-plex-tv-webhook
Jul 20, 2026
Merged

Fix Plex sink username filtering#1799
IgnisDa merged 1 commit into
mainfrom
issue-1798-plex-tv-webhook

Conversation

@IgnisDa

@IgnisDa IgnisDa commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • treat blank or whitespace-only Plex Sink usernames as an unset optional filter
  • log username mismatches and unsupported webhook event types instead of silently returning no update
  • clarify in the integration UI and documentation that the configured value must match Account.title

Root cause

The optional username form field preserves an empty value as an empty string. The sink treated that as an active filter, causing every Plex webhook to be rejected without explaining why. The documentation also instructed users to enter their Plex full name even though current payloads expose the matching value through Account.title, typically the Plex username.

Verification

  • rustfmt --edition 2024 --check crates/services/integration/src/sink/plex.rs
  • yarn turbo lint --filter=@ryot/frontend --filter=@ryot/docs
  • yarn turbo build --filter=@ryot/frontend
  • yarn turbo build --filter=@ryot/docs

Fixes #1798

Summary by CodeRabbit

  • Bug Fixes

    • Plex Sink username matching now uses the exact Account.title value from Plex webhook payloads.
    • Leading or trailing spaces are ignored, and an empty username accepts events from all users.
    • Unsupported Plex webhook event types are handled gracefully.
  • Documentation

    • Updated Plex integration setup instructions to clarify username requirements.
  • UI Improvements

    • Added guidance to the Plex username field explaining the exact value required.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The Plex Sink now documents exact Account.title username matching, treats blank usernames as unrestricted, normalizes configured values before comparison, and logs username mismatches and unsupported webhook event types.

Changes

Plex Sink username matching

Layer / File(s) Summary
Plex username configuration guidance
apps/docs/src/integrations/plex-sink.md, apps/frontend/app/routes/_dashboard.settings.integrations.tsx
Documentation and the integration settings UI specify that the username must exactly match Plex webhook Account.title; empty values accept events from all users.
Plex sink filtering and diagnostics
crates/services/integration/src/sink/plex.rs
Configured usernames are trimmed and empty values ignored before comparison; mismatches and unsupported event types now emit debug logs before being ignored.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR changes username filtering and logging, but #1798 is about Plex TV watch progress tracking and episode matching, which are not addressed. Implement the Plex TV webhook episode-matching, position-handling, and progress-update fixes described in #1798, or re-scope the PR.
Out of Scope Changes check ⚠️ Warning The docs, UI hint, and username-filtering changes are unrelated to #1798's watch-progress and episode-matching problem. Remove or split the username-filtering/docs/UI work unless it directly fixes #1798, and keep the PR focused on the webhook progress bug.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: Plex sink username filtering was fixed.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-1798-plex-tv-webhook

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@IgnisDa
IgnisDa merged commit 70004c6 into main Jul 20, 2026
14 checks passed
@IgnisDa
IgnisDa deleted the issue-1798-plex-tv-webhook branch July 20, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plex webhook never tracks TV show watch progress - "No show found" / "No position associated with this media" on all shows

1 participant