diff --git a/apps/wizarr-backend/wizarr_backend/helpers/emby.py b/apps/wizarr-backend/wizarr_backend/helpers/emby.py index c86f52bce..41b272f49 100644 --- a/apps/wizarr-backend/wizarr_backend/helpers/emby.py +++ b/apps/wizarr-backend/wizarr_backend/helpers/emby.py @@ -253,20 +253,18 @@ def invite_emby_user(username: str, password: str, code: str, server_api_key: Op if invitation.specific_libraries is not None and len(invitation.specific_libraries) > 0: sections = invitation.specific_libraries.split(",") - print(sections) - # Create user object new_user = { "Name": str(username) } # Create user in Emby user_response = post_emby(api_path="/Users/New", json=new_user, server_api_key=server_api_key, server_url=server_url) - # Set user password - post_emby(api_path=f"/Users/{user_response['Id']}/Password", json={"NewPw": str(password)}, server_api_key=server_api_key, server_url=server_url) - # Create policy object new_policy = { "EnableAllFolders": True, + "SimultaneousStreamLimit": 0, + "EnableLiveTvAccess": False, + "EnableLiveTvManagement": False, "AuthenticationProviderId": "Emby.Server.Implementations.Library.DefaultAuthenticationProvider", } @@ -278,14 +276,10 @@ def invite_emby_user(username: str, password: str, code: str, server_api_key: Op # Set stream limit options if invitation.sessions is not None and int(invitation.sessions) > 0: new_policy["SimultaneousStreamLimit"] = int(invitation.sessions) - else: - new_policy["SimultaneousStreamLimit"] = 0 # Set live tv access if invitation.live_tv is not None and invitation.live_tv == True: new_policy["EnableLiveTvAccess"] = True - else: - new_policy["EnableLiveTvAccess"] = False # Set the hidden user status if invitation.hide_user is not None and invitation.hide_user == False: @@ -303,6 +297,9 @@ def invite_emby_user(username: str, password: str, code: str, server_api_key: Op # Update user policy post_emby(api_path=api_path, json=new_policy, server_api_key=server_api_key, server_url=server_url) + # Set user password, this is done after the policy is set due to LDAP policies + post_emby(api_path=f"/Users/{user_response['Id']}/Password", json={"NewPw": str(password)}, server_api_key=server_api_key, server_url=server_url) + # Return response return user_response diff --git a/apps/wizarr-backend/wizarr_backend/helpers/jellyfin.py b/apps/wizarr-backend/wizarr_backend/helpers/jellyfin.py index 858f2d14c..b6a0b7c1d 100644 --- a/apps/wizarr-backend/wizarr_backend/helpers/jellyfin.py +++ b/apps/wizarr-backend/wizarr_backend/helpers/jellyfin.py @@ -262,6 +262,9 @@ def invite_jellyfin_user(username: str, password: str, code: str, server_api_key # Create policy object new_policy = { "EnableAllFolders": True, + "MaxActiveSessions": 0, + "EnableLiveTvAccess": False, + "EnableLiveTvManagement": False, "AuthenticationProviderId": "Jellyfin.Server.Implementations.Users.DefaultAuthenticationProvider", } @@ -273,14 +276,10 @@ def invite_jellyfin_user(username: str, password: str, code: str, server_api_key # Set session limit options if invitation.sessions is not None and int(invitation.sessions) > 0: new_policy["MaxActiveSessions"] = int(invitation.sessions) - else: - new_policy["MaxActiveSessions"] = 0 # Set live tv access if invitation.live_tv is not None and invitation.live_tv == True: new_policy["EnableLiveTvAccess"] = True - else: - new_policy["EnableLiveTvAccess"] = False # Set the hidden user status if invitation.hide_user is not None and invitation.hide_user == False: diff --git a/apps/wizarr-frontend/src/components/NavBars/DefaultNavBar.vue b/apps/wizarr-frontend/src/components/NavBars/DefaultNavBar.vue index 762227ff3..3bdbf9ded 100644 --- a/apps/wizarr-frontend/src/components/NavBars/DefaultNavBar.vue +++ b/apps/wizarr-frontend/src/components/NavBars/DefaultNavBar.vue @@ -1,9 +1,14 @@ diff --git a/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue b/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue index 52875bec0..684582796 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue @@ -387,7 +387,7 @@ export default defineComponent({ }); }, inviteLink() { - return `${window.location.origin}/j/${this.inviteCode}`; + return `${window.location.origin}/i/${this.inviteCode}`; }, ...mapState(useLibrariesStore, ["libraries"]), ...mapState(useServerStore, ["settings"]), diff --git a/apps/wizarr-frontend/src/modules/admin/components/InvitationManager/Invitation.vue b/apps/wizarr-frontend/src/modules/admin/components/InvitationManager/Invitation.vue index 6afb71d96..55aad2e3d 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/InvitationManager/Invitation.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/InvitationManager/Invitation.vue @@ -91,7 +91,7 @@ export default defineComponent({ active: true, }, { - value: `${window.location.origin}/j/${this.invitation.code}`, + value: `${window.location.origin}/i/${this.invitation.code}`, active: false, }, ], diff --git a/apps/wizarr-frontend/src/modules/admin/components/Invitations/InvitationList/InvitationItem.vue b/apps/wizarr-frontend/src/modules/admin/components/Invitations/InvitationList/InvitationItem.vue index 337eeefb1..de8df986e 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/Invitations/InvitationList/InvitationItem.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/Invitations/InvitationList/InvitationItem.vue @@ -105,7 +105,7 @@ export default defineComponent({ text: this.__( 'I wanted to invite you to join my media server.', ), - url: `${window.location.origin}/j/${this.invite.code}`, + url: `${window.location.origin}/i/${this.invite.code}`, }, }; }, @@ -138,7 +138,7 @@ export default defineComponent({ async copyToClipboard() { if (this.clipboard.isSupported) { this.clipboard.copy( - `${window.location.origin}/j/${this.invite.code}`, + `${window.location.origin}/i/${this.invite.code}`, ); this.$toast.info(this.__('Copied to clipboard')); } else { diff --git a/apps/wizarr-frontend/src/modules/admin/components/Invitations/ShareSheet.vue b/apps/wizarr-frontend/src/modules/admin/components/Invitations/ShareSheet.vue index 1e680e258..ee244c74c 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/Invitations/ShareSheet.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/Invitations/ShareSheet.vue @@ -66,9 +66,9 @@ export default defineComponent({ }, data() { return { - invitationLink: `${window.location.origin}/j/${this.code}`, + invitationLink: `${window.location.origin}/i/${this.code}`, QRcode: useQRCode( - `${window.location.origin}/j/${this.code}`, + `${window.location.origin}/i/${this.code}`, this.qrCodeOptions, ), clipboard: useClipboard({ diff --git a/apps/wizarr-frontend/src/modules/admin/components/Users/UserManager/User.vue b/apps/wizarr-frontend/src/modules/admin/components/Users/UserManager/User.vue index caf17377a..a7680b7bb 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/Users/UserManager/User.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/Users/UserManager/User.vue @@ -100,7 +100,7 @@ export default defineComponent({ active: true, }, { - value: `${window.location.origin}/j/${this.user.code}`, + value: `${window.location.origin}/i/${this.user.code}`, active: false, }, ], diff --git a/apps/wizarr-frontend/src/modules/authentication/components/LoginForm.vue b/apps/wizarr-frontend/src/modules/authentication/components/LoginForm.vue index db223b8b2..98737c944 100644 --- a/apps/wizarr-frontend/src/modules/authentication/components/LoginForm.vue +++ b/apps/wizarr-frontend/src/modules/authentication/components/LoginForm.vue @@ -1,10 +1,6 @@