feat: new plugin — Jellyfin Now Playing (poster, title, progress) v1.0.0 - #219
Conversation
…+ progress (v1.0.0) Polls the Jellyfin /Sessions API and shows the active session: poster art fitted to the panel height (series poster for TV episodes, album art for music), marquee-scrolling title and subtitle, a paused indicator, and a progress bar extrapolated between polls so it moves smoothly without a background thread. - Session selection: username filter, content-type filter (Movie/Episode/ Audio), optional hiding of paused sessions, playing preferred over paused - API key sent via the Authorization header only, declared x-secret in the config schema; sessions cached through cache_manager keyed by plugin id - On-panel states: setup hint when URL/key missing, "Update API Key" on 401/403, "Unreachable" on network errors, "Nothing Playing" when idle — all anti-flash guarded - Layouts for 64x32 / 128x32 / 128x64 / 256x32: time readout on wide and tall panels, poster placeholder when the image fetch fails - test/harness.json renders the deterministic setup screen with no network; registry entry added to plugins.json (update_registry.py only syncs existing entries) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCQxU7Rb7yEXBkJ2Pb8im8
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a Jellyfin Now Playing plugin that polls playback sessions, selects active media, caches posters, and renders playback details on an LEDMatrix display. It also adds configuration, manifest, dependencies, documentation, test harness data, and registry metadata updates. ChangesJellyfin Now Playing plugin
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant DisplayManager
participant JellyfinNowPlayingPlugin
participant JellyfinServer
participant CacheManager
DisplayManager->>JellyfinNowPlayingPlugin: update()
JellyfinNowPlayingPlugin->>CacheManager: read cached sessions
JellyfinNowPlayingPlugin->>JellyfinServer: request /Sessions
JellyfinServer-->>JellyfinNowPlayingPlugin: return playback sessions
JellyfinNowPlayingPlugin->>CacheManager: cache session and poster data
DisplayManager->>JellyfinNowPlayingPlugin: display()
JellyfinNowPlayingPlugin-->>DisplayManager: render playback state
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/jellyfin-now-playing/requirements.txt`:
- Around line 1-3: Update the Pillow dependency declaration in requirements.txt
from a minimum of 12.2.0 to 12.3.0, while leaving the requests requirement
unchanged.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fb04f2fd-da7a-498f-a871-5b74a9765d32
📒 Files selected for processing (8)
plugins.jsonplugins/jellyfin-now-playing/LICENSEplugins/jellyfin-now-playing/README.mdplugins/jellyfin-now-playing/config_schema.jsonplugins/jellyfin-now-playing/manager.pyplugins/jellyfin-now-playing/manifest.jsonplugins/jellyfin-now-playing/requirements.txtplugins/jellyfin-now-playing/test/harness.json
Pillow 12.2.0 is affected by several PYSEC advisories that are fixed in 12.3.0; the plugin has not shipped yet so this stays within v1.0.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCQxU7Rb7yEXBkJ2Pb8im8
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 125 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…analysis Codacy's credential-disclosure heuristic flagged the logger call because the message text mentioned "API key"/"secrets", reading it as a hardcoded secret being logged. Only the HTTP status code is ever logged; reword the message so the heuristic no longer matches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JCQxU7Rb7yEXBkJ2Pb8im8
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Pull Request
Summary
Adds a new
jellyfin-now-playingplugin that polls a Jellyfin server's/SessionsAPI and shows the active session on the matrix: poster art fitted to the panel height (series poster for TV episodes, album art for music), marquee-scrolling title and subtitle, a paused indicator, and a playback progress bar that is extrapolated between polls so it moves smoothly with no background thread. Also adds the plugin's registry entry toplugins.json(a manual step, sinceupdate_registry.pyonly syncs entries that already exist).Type of change
Plugin(s) affected
jellyfin-now-playing (new)
Related issues
N/A
Test plan
(
EMULATOR=true python3 run.py)(
scripts/dev_server.py)Tested with a stubbed
BasePlugin+ mock display/cache managers and mocked Jellyfin responses, rendering every state (setup message, nothing playing, playing movie, paused episode, failed poster fetch) at all four panel sizes (64×32, 128×32, 128×64, 256×32) and eyeballing the output PNGs. Assertions covered: session selection (playing preferred over paused, username/content-type/paused filters), episode → series poster + series-name subtitle, tick→seconds conversion, progress extrapolation clamped to duration, anti-flash skip on identical static frames, and buffer size always matching the panel. Also ranpython -m py_compile, JSON validation of all new files,scripts/check_module_collisions.py(clean), andupdate_registry.py --dry-run(new entry syncs as up-to-date at 1.0.0). Not yet run against a live Jellyfin server or real hardware — the core safety harness runs in CI, andtest/harness.jsonrenders the deterministic no-network setup screen.Required for plugin changes
versioninplugins/<id>/manifest.json(new plugin ships at 1.0.0)class_nameinmanifest.jsonmatches the actual class inmanager.pyexactly (JellyfinNowPlayingPlugin)entry_pointmatches the real file (manager.py)README.mdif config keys changed (new README documents every key)config_schema.jsonis the source of truth for the web UI form — every option has adefault,description, and constraintsplugins.json)SUBMISSION checklist (new plugins only)
manifest.jsonhas all required fields (id,name,version,class_name,display_modes)manager.pyinherits fromBasePluginand implementsupdate()anddisplay()config_schema.jsonexists and validates as JSON Schema Draft-7requirements.txtlists all Python dependencies (requests,Pillow)README.mddocuments what the plugin does, how to install, and the configuration optionsLICENSEis GPL-3.0 (copied from clock-simple)api_keyis declaredx-secretand sent only via theAuthorizationheader to the user's own serverChecklist
CONTRIBUTING.mdCONTRIBUTING.mdandCODE_OF_CONDUCT.mdNotes for reviewer
ledmatrix-music): one/SessionsGET perupdate()tick; the progress bar position is extrapolated locally fromPositionTicks+ elapsed time while playing, clamped to the duration. Simpler lifecycle, nothing to tear down incleanup().SeriesId), not the episode still — a 2:3 poster reads far better at 21–42 px wide, and stills are landscape.test/harness.jsonmakes the harness render the deterministic setup screen with zero network; a follow-up can add a mocked-sessions fixture + goldens once the harness's mock-injection mechanism for HTTP calls is confirmed.plugins.jsongained the new entry by hand sinceupdate_registry.pyonly updates existing entries; the pre-commit hook verified it stays in sync.🤖 Generated with Claude Code
https://claude.ai/code/session_01JCQxU7Rb7yEXBkJ2Pb8im8
Generated by Claude Code
Summary by CodeRabbit
New Features
Documentation