-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jellyseerr integration #351
Conversation
Currently uses an API key (Seems simpler for the user than importing the jfa-go user and granting perms). Strategy as follows: * MustGetUser(jfID) function checks the cache for user, if not, calls Jellyseerr's importer passing jfID. From either, the user object is returned, which (in later commits) can be used to update the user's email (and potentially other info). My API key is in there rn but its for a local testing instance, who cares.
addded permissions get/set before realizing it already comes as part of the User object. Split User attributes that will be templated into UserTemplate struct, which User inherits. ApplyTemplateToUser takes a UserTemplate, while ModifyUser takes a plain map with some typed fields (display name and email, for now).
similar in style to User, with Notifications/NotificationsTemplate, and named fields for modifying discord and telegram IDs, and two modify methods.
added in the same way as ombi profiles. Most code is copy-pasted and adjusted from ombi (especially on web), so maybe this can be merged in the future. Also, profile names are url-escaped like announcement template names were not too long ago. API client has "LogRequestBodies" option which just dumps the request body when enabled (useful for recreating reqs in the jellyseerr swagger UI). User.Name() helper returns a name from all three possible values in the struct.
changed to a pointer so it can be nil-ed, and an Empty() receiver method is used to check if it needs it in ApplyNotificationsTemplateToUser.
All-zeros in NotifTypes means the user shouldn't receive any communication, which is a state we'd like to store in/apply from a profile.
✅ Deploy Preview for jfa-go canceled.
|
hopefully all places where contact methods can be adjusted should sync with jellyseerr.
Checkboxes added when applying from a profile.
Merging since no real affect on other parts of the software, and I actual people to try it. |
"import_existing" option in settings enables an every 5-minute daemon which loops through users and imports them to Jellyseerr and copies contact info, if necessary. Also sets new API client flag AutoImportUsers, which decides whether to automatically import non-existent users in it's various methods. also cleaned up the various daemons in the software, most now using the GenericDaemon struct and just providing a new constructor. broken page loop in jellyseerr client also fixed.
single req() function is wrapped by methods for each http method, and error messages are parsed and returned if given by the server. also added note about Jellyseerr's enforcement of unique email addresses in settings.
was 30s for testing, is now every 10 minutes.
Basically, added the ability to -not- apply the profile's policy.
Hey! Thanks for the new feature. I'm migrating from Ombi to Jellyseerr. Which docker version of jfa-go can I use to get the Jellyseerr integration? It doesn't seem to be on the latest tag yet. Thanks again! |
|
Is there any plan to merge to the main? |
I’m currently using this via However, when I create a user via the admin panel and User -> New User it doesn’t include the email address in JellySeerr but the user is created in JellySeerr. Potentially unrelated but when I click create I also get a notification for an error that the email couldn’t be sent. However, I have manually verified that it is indeed sent. Let me know if you’d rather I create an issue instead |
Adds Jellyseerr integration on par with, or better than the current Ombi integration:
Profiles for user and notification settings can be added in Settings > User Profiles, similarly to Ombi
On invites w/ a profile w/ a Jellyseerr profile, and when creating accounts from the admin page, creating an account triggers the Jellyseerr user importer (on the created user only), resulting in a "Jellyfin User" which uses Jellyfin for auth, avoiding the need for password synchronization.
Email, Discord and Telegram details are synchronized, as are contact preferences for each (hopefully)
Existing accounts without a "Jellyseerr account" will have them automatically created.
"Import existing users" setting triggers daemon to auto-import Jellyfin users.
Look into synchronizing disabled account state.Jellyseerr correctly handles disabled accounts already.Uses an API key found in Jellyseerr's settings page.
Basic API client available in the "jellyseer/" directory.
Also involved some cleanup of the various daemons.