From ff55d21e640ec91b3bdaf29b0f36edacf3b8cd6c Mon Sep 17 00:00:00 2001 From: Parker Date: Mon, 16 Jun 2025 16:24:39 -0500 Subject: Fix user updates and restrict acc. more --- code/utils/jellyfin_create.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/code/utils/jellyfin_create.py b/code/utils/jellyfin_create.py index 03c6c8d..43ad6a6 100644 --- a/code/utils/jellyfin_create.py +++ b/code/utils/jellyfin_create.py @@ -53,14 +53,19 @@ def create_jellyfin_account(user_id): if request_2.status_code != 200: return False - account_policy = request_2.json() - account_policy["Policy"]["SyncPlayAccess"] = "JoinGroups" - account_policy["Policy"]["EnableContentDownloading"] = False - account_policy["Policy"]["InvalidLoginAttemptCount"] = 3 - account_policy["Policy"]["MaxActiveSessions"] = 1 + account_policy = request_2.json()["Policy"] + account_policy["EnableSharedDeviceControl"] = False + account_policy["EnableRemoteAccess"] = False + account_policy["EnableLiveTvManagement"] = False + account_policy["EnableContentDownloading"] = False + account_policy["LoginAttemptsBeforeLockout"] = 3 + account_policy["MaxActiveSessions"] = 1 + account_policy["EnablePublicSharing"] = False + account_policy["RemoteClientBitrateLimit"] = 15000000 + account_policy["SyncPlayAccess"] = "JoinGroups" # Update the user with the newly edited policy request_3 = requests.post( - f"{JELLYFIN_URL}/Users?userId={jellyfin_user_id}", + f"{JELLYFIN_URL}/Users/{jellyfin_user_id}/Policy", headers=JELLYFIN_HEADERS, json=account_policy, ) -- cgit v1.2.3-70-g09d2