aboutsummaryrefslogtreecommitdiff
path: root/code/utils
diff options
context:
space:
mode:
Diffstat (limited to 'code/utils')
-rw-r--r--code/utils/jellyfin_create.py17
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,
)