Skip to content

feat: request button navs to the jf entry for available media - #29

Open
b3p3k0 wants to merge 1 commit into
varunaditya-plus:mainfrom
b3p3k0:feat/available-button-opens-item
Open

b3p3k0 wants to merge 1 commit into
varunaditya-plus:mainfrom
b3p3k0:feat/available-button-opens-item

Conversation

@b3p3k0

@b3p3k0 b3p3k0 commented Aug 16, 2026

Copy link
Copy Markdown

Summary

(generated by Claude, reviewed and lightly edited by human)

In the details modal, media that already exists on the server shows a disabled "Available" / "Partially available" button — a dead end, especially for non-technical users who found the title through the discover rows and now have no clear path to actually watch it.

This PR makes that button more effective imho by giving the user a direct path to the title: when Seerr knows the item's Jellyfin id (mediaInfo.jellyfinMediaId / jellyfinMediaId4k, present for status 4/5), the button renders enabled — looking exactly like a normal "(Partially) Avaialble" button — and clicking it closes the modal and navigates to the item's Jellyfin details page. Label text is unchanged and users have a clear path to playing the title.

  • If Seerr has no Jellyfin id for the item, the button stays disabled exactly as before - no behavior change.
  • Navigation reuses the same pattern as the Requests tab's Play button (ApiClient.getItem -> AppRouter.showItem, falling back to Dashboard.navigate('details?id=…')), copied into the modal since each Inject file is self-contained. Seerr itself builds the same details?id= links server-side, so the pattern has upstream precedent.
  • The request click-handler is else if-gated, so a navigable button can never also open the request dialog. 4K button gets the symmetric treatment.
  • One file changed: Inject/seerrfin-modal.js (+53/−5). No CSS, backend, or config changes; no version bump.

How I tested

Disposable Docker stack: Fresh Jellyfin 10.11.11 + Seerr (ghcr.io/seerr-team/seerr:latest) + a local plugin repository, with File Transformation and this build installed through the normal Dashboard → Plugins → Repositories flow.

  1. Library title surfaced in the Trending row → modal shows enabled "Available" button (normal Request styling) → click → modal closes, lands on the item's Jellyfin details page. ✅
  2. Not-on-server title → "Request" works as before, request appears in Seerr, button flips to disabled "Pending". ✅
  3. Title with no jellyfinMediaId → button disabled, unchanged from current behavior. ✅
  4. Browser console clean throughout. ✅

My own "prod" stack: installed manually per Jellyfin SOP and existing prereqs

  1. Smoke-tested the built DLL on my production Jellyfin server: fully-available movie and a partially-available series (Ted Lasso) both navigate correctly. No issues noted (touch wood) ✅

Environment: Jellyfin 10.11.11 (Docker, official image) and a bare metal "production" Jellyfin instance 10.11.11 • Seerr latest (ghcr) • Firefox on Ubuntu Linux 26.04 • default theme

Screenshots: Screenshot_20260816_122627

AI usage disclosure (per CONTRIBUTING #3)

Written with AI assistance: Claude Code (CLI/VSCode harness), model Claude Fable 5 (claude-fable-5), across a recon session (reading this codebase + Seerr's source to find jellyfinMediaId and the existing navigateToJellyfinItem pattern) and an implementation session. All code was reviewed line-by-line and tested end-to-end by me on the setups described above.

The humble human has 30+ years experience in programming and computing, but not in these languages. Claude was a "Rosetta Stone" to turn my idea and pseudocode into something workable.

🤖 Generated with Claude Code

@varunaditya-plus

Copy link
Copy Markdown
Owner

I really like this PR, thank you so much for your contribution. But there are two things you should look at:

  • Rebase and keep partially available TV shows requestable; use a separate Play action if needed.
  • Use the Requests tab’s user-scoped Jellyfin lookup instead of trusting Seerr’s raw item ID. Don't navigate after lookup failure.
  • Please retest available movies, partial TV, 4K, and users without library access.

… already in the user's Jellyfin library

The greyed-out "Available" button becomes a live one that opens the title in
Jellyfin, but only when the plugin's own library lookup (the same user-scoped
query the Requests tab uses) finds it in a library the signed-in user can access.
Partially available shows keep upstream's enabled Request button next to a
"Partially available" button that opens the series. If Jellyfin cannot confirm
the item on click, an alert is shown and nothing navigates.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q8YaRXbb9HLopNkY2ngER4
@b3p3k0 b3p3k0 closed this Sep 14, 2026
@b3p3k0 b3p3k0 reopened this Sep 14, 2026
@b3p3k0
b3p3k0 force-pushed the feat/available-button-opens-item branch from 584b322 to 1507c85 Compare September 14, 2026 14:00
@b3p3k0

b3p3k0 commented Sep 14, 2026

Copy link
Copy Markdown
Author

ty for your feedback, I've made the following changes:

  • rebased to 1.7.1.2
  • partial series remain playable but retain the "request" button for add'l episodes (note: when the clickable "Available" shows, the greyed "Available" from the same state is not drawn, since two identical labels side by side confused the first testers. Request 4K is otherwise unchanged.)
  • details endpoint now runs the same ResolveLibraryItemId query as Requests tab (small public overload, no new route). button only appears when that title is found in the calling user's library. On click the modal asks jellyfin for the item as that user first; if that fails it alerts and does not navigate.
  • retested on a fresh Docker stack (Jellyfin 12.0.0, Seerr 3.4.1, File Transformation 3.0.0.0, patched SeerrFin 1.7.1.2) and my live server (Jellyfin 12.0.0, Seerr 3.2.0, patched SeerrFin 1.7.1.2, ~40 users), Firefox, console open:

available movie: PASS
partial TV (opens series, Request still opens the season picker): PASS
user without library access (button stays grey, details carries no item id even though Seerr reports one): PASS
not on server: PASS
pending/processing unchanged: PASS
4K: PASS
no SeerrFin-related console messages: PASS

AI usage as in the original description: Claude Code (Claude Fable 5.1) drafted the code and test scripts; I reviewed every line and ran the tests on both setups.

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.

2 participants