diff --git a/apps/wizarr-backend/wizarr_backend/helpers/emby.py b/apps/wizarr-backend/wizarr_backend/helpers/emby.py index 93ba5f40..31642a62 100644 --- a/apps/wizarr-backend/wizarr_backend/helpers/emby.py +++ b/apps/wizarr-backend/wizarr_backend/helpers/emby.py @@ -267,10 +267,17 @@ def invite_emby_user(username: str, password: str, code: str, server_api_key: Op # Create policy object new_policy = { "EnableAllFolders": True } + # Set library options if sections: new_policy["EnableAllFolders"] = False new_policy["EnabledFolders"] = sections + # 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 + old_policy = user_response["Policy"] # Merge policy with user policy don't overwrite 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 808c55d0..9ff00d60 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/Forms/InvitationForm.vue @@ -205,7 +205,7 @@ export default defineComponent({ selects: { jellyfin: { sessions: { - label: "Maximum Number of Simultaneous User Logins", + label: "Maximum Number of Simultaneous Logins", options: { 0: "No Limit", 1: "1 Session", @@ -221,6 +221,24 @@ export default defineComponent({ }, }, }, + emby: { + sessions: { + label: "Maximum Number of Simultaneous Streams", + options: { + 0: "No Limit", + 1: "1 Stream", + 2: "2 Streams", + 3: "3 Streams", + 4: "4 Streams", + 5: "5 Streams", + 6: "6 Streams", + 7: "7 Streams", + 8: "8 Streams", + 9: "9 Streams", + 10: "10 Streams", + }, + }, + }, } as Record }>>, advancedOptions: false, clipboardToast: null as ToastID | null, 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 5c6cd78d..ce052635 100644 --- a/apps/wizarr-frontend/src/modules/admin/components/InvitationManager/Invitation.vue +++ b/apps/wizarr-frontend/src/modules/admin/components/InvitationManager/Invitation.vue @@ -127,7 +127,7 @@ export default defineComponent({ selects: { jellyfin: { sessions: { - label: "Maximum Number of Simultaneous User Logins", + label: "Maximum Number of Simultaneous Logins", value: this.invitation.sessions, options: { 0: "No Limit", @@ -144,6 +144,25 @@ export default defineComponent({ }, }, }, + emby: { + sessions: { + label: "Maximum Number of Simultaneous Streams", + value: this.invitation.sessions, + options: { + 0: "No Limit", + 1: "1 Stream", + 2: "2 Streams", + 3: "3 Streams", + 4: "4 Streams", + 5: "5 Streams", + 6: "6 Streams", + 7: "7 Streams", + 8: "8 Streams", + 9: "9 Streams", + 10: "10 Streams", + }, + }, + }, } as Record }>>, clipboard: useClipboard({ legacy: true,