Skip to content

Auto-configure Seerr from Wholphin server plugin - #1418

Closed
matschi95 wants to merge 40 commits into
damontecres:mainfrom
matschi95:develop/server-plugin-seerr
Closed

matschi95 wants to merge 40 commits into
damontecres:mainfrom
matschi95:develop/server-plugin-seerr

Conversation

@matschi95

Copy link
Copy Markdown
Contributor

Description

PR damontecres/jellyfin-plugin-wholphin#3 defines a new endpoint for Seerr configuration in plugin. This PR consumes this new endpoint (/wholphin/seerrsettings) to setup Seerr on first Jellyfin login. The new plugin endpoint exposes:

  • server URL
  • auth method: ApiKey, Local, Jellyfin
  • settings for each auth method

Jellyfin auth method supports useCurrentUser option, which stashes the in-memory Jellyfin password from password-based login and resuses it for automatic Seerr login.

Methods without passwords (QuickConnect) are only pre-filling the Seerr dialog with URL and user name. A manual configuration by entering the password is needed.

If Seerr is unreachable during the initial setup, credentials are persisted to retry Seerr login automatically at the next start of the app (so long until Seerr is reachable again).

Related issues

Testing

Tested with following settings in plugin and Android TV emulator:

SeerrConfig:
  serverUrl: https://seerr.example.com
  login:
    type: Jellyfin     # ApiKey | Jellyfin | Local
    jellyfin:
      useCurrentUser: true
  • Tested login via password and QuickConnect (only autofill)
  • Tested restarts of App and restarts of Emulator
  • Tested user switching

Screenshots

no changes, only that Seerr integration gets automatically configured

AI or LLM usage

This PR was developed in pair with Claude (Anthropic). I understand the code and can explain every change made in the PR. Manual end-to-end testing was performed by me on an Android TV emulator.

@matschi95
matschi95 force-pushed the develop/server-plugin-seerr branch from f6d3f96 to 5a5c0e1 Compare May 23, 2026 19:46
@MulverineX MulverineX mentioned this pull request May 28, 2026
3 of 8 tasks
damontecres and others added 5 commits May 31, 2026 16:39
Adds a new HomeRowConfig variant `CustomEndpoint` that resolves rows by
GET-ing an arbitrary Jellyfin endpoint returning QueryResult<BaseItemDto>.
Lets third-party plugins (e.g. jellyfin-plugin-home-sections) feed rows
into Wholphin without Wholphin needing specific knowledge of them.

- Resolves both relative and absolute endpoint URLs via HttpUrl.resolve()
- Auto-injects current userId as query param (overridable per-config)
- Headers/Query are List<KeyValueEntry> to match the server-side plugin's
  XML-serializable shape
- Auth token added automatically via AuthOkHttpClient
@matschi95
matschi95 force-pushed the develop/server-plugin-seerr branch from 5a5c0e1 to 67c684e Compare June 1, 2026 17:09
@damontecres

Copy link
Copy Markdown
Owner

I'd like to simplify this PR & damontecres/jellyfin-plugin-wholphin#3 a bit.

Would you be okay with updating this PR so that it doesn't involve the current jellyfin user's credentials? Instead it would just read the Seerr server URL & auth type from the plugin. And if the auth type is Local or API Key, optionally, the plugin can provide those credentials that this PR reads as well.

We can discuss a more seamless jellyfin credential login separately in a follow up PR.

Consume the new /wholphin/seerrsettings endpoint to set up Seerr on first
Jellyfin login: server URL, auth method (ApiKey/Local/Jellyfin) and
credentials are pushed by the plugin so the user doesn't have to
configure Seerr manually.

Supports useCurrentUser=true for the Jellyfin auth method, which stashes
the in-memory Jellyfin password during password-based login and reuses
it for Seerr. On QuickConnect / token-based logins the password is not
available — the URL and username are pre-filled in the Add Seerr Server
dialog so the user only enters the password once.

If Seerr is unreachable during the initial setup, credentials are
persisted before the login attempt so subsequent app starts retry
automatically until Seerr is back. QuickConnect logins clear any
previously stored Jellyfin password to avoid using stale credentials.
@matschi95
matschi95 force-pushed the develop/server-plugin-seerr branch from 67c684e to 01a438d Compare June 23, 2026 18:27
@matschi95

matschi95 commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor Author

I have simplified the PR as requested by removing all Jellyfin user handling for Seerr. Therefore, automatic Seerr login is now only possible via an API key or a local Seerr account.

EDIT: I have also removed the Jellyfin Login in the plugin PR

- Model plugin Seerr login as a sealed interface

- Move plugin Seerr restore and auto-setup into SeerrServerRepository

- Fetch plugin prefill URL on demand and persist it without auto-login

- Load Seerr dialog prefill URL via DataLoadingState

- Keep AddSeerrServerDialog URL non-nullable

- Remove obsolete ViewModel and listener state from the refactor
@matschi95

Copy link
Copy Markdown
Contributor Author

I have implemented all the requested changes in the new commit.

@damontecres damontecres left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good! I need to review the plugin side again and then I'll merge both PRs.

## Description

This PR adds support for the CustomEndpoint implemented in
damontecres/jellyfin-plugin-wholphin#4. With
this it is now possible to use sections provided by
[jellyfin-plugin-home-sections](https://github.com/IAmParadox27/jellyfin-plugin-home-sections)
directly in the Wholphin client (fe. `My Request` or `Latest Movies`).

Some endpoints need the userId for providing user-specific lists (fe.
`My Requests`). Therefore the userId will always be added when calling a
custom endpoint, because we can only define static items in our YAML
definition.

### Related issues

- Discussion about plugin integration:
damontecres#598
- Pull request for Wholphin plugin integration:
damontecres#1384
- **Changes needed** from our Plugin:
damontecres/jellyfin-plugin-wholphin#4

### Testing

The feature was tested on an Android TV emulator. 

For the final test I have also implemented Wholphin support in the
Home-Section-Plugin on my branch
[develop/wholphin-plugin](https://github.com/matschi95/jellyfin-plugin-home-sections/tree/develop/wholphin-plugin).
With this change, I was able to push all sections provided by their
plugin to our Wholphin client without writing one single line to our
Wholphin Plugin Configuration YAML.

## Screenshots

No changes

## AI or LLM usage

This PR was developed in pair with Claude (Anthropic). I understand the
code and can explain every change made in the PR. Manual end-to-end
testing was performed by me on an Android TV emulator.
@damontecres
damontecres deleted the branch damontecres:develop/server-plugin October 19, 2026 18:41
@damontecres damontecres reopened this Oct 19, 2026
@damontecres
damontecres changed the base branch from develop/server-plugin to main October 19, 2026 18:42
@damontecres

Copy link
Copy Markdown
Owner

Closing in favor of #2134

damontecres added a commit that referenced this pull request Oct 26, 2026
## Description
damontecres/jellyfin-plugin-wholphin#3 added a
new endpoint for Seerr configuration in Wholphin server plugin.

This PR adds support for reading that configuration and either
pre-filling the URL or automatically logging in.

Some code was copied from #1418 (thanks @matschi95!), but that PR worked
by inserting a DB record for the plugin provided server. Since the local
DB was preferred, this meant plugin config changes wouldn't be reflected
in the client. This PR instead attempts the connection and only updates
the in-memory connection state, so user switching and app restarts will
re-fetch from the plugin.

If the server plugin is not installed or no Seerr server is configured,
nothing in Wholphin changes.

### Related issues
#598 

This PR replaces #1418


### Testing
Emulator with different scenarios

## Screenshots
N/A

## AI or LLM usage
None
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