diff options
author | Parker <contact@pkrm.dev> | 2025-06-16 16:24:39 -0500 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2025-06-16 16:24:39 -0500 |
commit | ff55d21e640ec91b3bdaf29b0f36edacf3b8cd6c (patch) | |
tree | 64fdc0288ffa9d4682f91d64de6a39a01815bae4 /code/utils | |
parent | a9ce855aa8cd1d81a5885584c28599c561a8249b (diff) |
Diffstat (limited to 'code/utils')
-rw-r--r-- | code/utils/jellyfin_create.py | 17 |
1 files 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, ) |