Skip to content

fix(library): play ready to watch movies in the app - #74

Merged
selmant merged 1 commit into
developfrom
fix/ready-to-watch-movie-play
Nov 27, 2026
Merged

selmant merged 1 commit into
developfrom
fix/ready-to-watch-movie-play

Conversation

@selmant

@selmant selmant commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Description

In the Foreseerr app, pressing Play on a movie in the Library's Ready to Watch shelf opened Jellyfin's web page in the browser the first time, and only the second Play (from the details view) used the app's player.

Cause: the Ready to Watch rows (and the available-library rows) are built from Foreseerr's requests/media tables and never set playItemId for movies. With no id, the card's Play opened the details view but didn't cancel the click, so the card's Jellyfin link was followed too, and the app sends links that leave Foreseerr to the browser.

  • Movie rows in forgotten_requests and available now carry their own Jellyfin item id as playItemId (series still get an episode in enrich).
  • A library card with nothing to play cancels its link and only opens the details view.

How Has This Been Tested?

  • Found from the app log, Chromium history and the server log: each browser open followed a Library home load by 2–5 s, and /api/v1/library/watch-now returned playItemId: null for every movie on the Ready to Watch shelf while browse and the item endpoint had it.
  • cargo fmt --check, cargo test --bin foreseerr library (19 passed), eslint, prettier and tsc --noEmit.
  • Not yet tried end to end in the app.

Checklist:

  • I have read and followed the contribution guidelines.
  • I tested this change manually (see our AI policy)
  • I have updated the documentation accordingly. (none needed)
  • All new and existing tests passed.
  • Successful build bun run build
  • Translation keys bun run i18n:extract (no new strings)
  • Database migration (if required) (none)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Movie titles in forgotten requests and available libraries now use the correct Jellyfin item when played. TV series continue to resolve playback to an episode.
    • When a play item is unavailable, the default action is prevented. The inspector opens only when an inspector callback is available, while playback remains unavailable.

Movies on the Ready to Watch shelf (and in the available list) had no
playItemId, so their Play button opened the details view and also
followed the card's Jellyfin link, which the Foreseerr app opens in the
browser. Those rows now carry the movie's own item id, and a card with
nothing to play only opens the details view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Movie titles now receive a playback item ID, while series titles leave it unset. When playback has no item ID, the handler prevents the default event behavior and calls the inspector callback only when provided.

Changes: Library playback

Layer / File(s) Summary
Set playback targets for library titles
backend-rs/src/library.rs
Forgotten-request and available-library titles set playItemId to the item ID for movies. Series titles leave it unset for enrichment to resolve an episode target.
Handle missing playback item IDs
src/components/Library/useLibraryPlay.ts
When itemId is missing, playItem prevents the default event behavior and calls onNeedInspector only when provided. It still returns false.

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

Change: Bug fix

Merge Risk: Minimal · up to 536b5

Pressing Play on a movie in the Ready to Watch shelf or an available-library row should now start playback directly. A card with nothing to play opens only the details view and no longer follows the Jellyfin link. No actionable merge risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: movie items in the Library Ready to Watch shelf and available rows now get a playItemId, so Play works in the app. The title also uses the conventional fix(library) pr…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: movie items in the Library Ready to Watch shelf and available rows now get a playItemId, so Play works in the app. The title also uses the conventional fix(library) prefix. It is specific and concise, and it matches the raw summary and PR objectives. The secondary change to card link and details-view behavior is not mentioned, which is acceptable because the title need not cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 89b94e8 and 536b551.

Files selected for processing: 2

  • backend-rs/src/library.rs
  • src/components/Library/useLibraryPlay.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@selmant
selmant enabled auto-merge (squash) November 27, 2026 20:27
@selmant
selmant merged commit 6f3dbcc into develop Nov 27, 2026
22 checks passed
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.

1 participant