From bbf348c1dcbb25b8f0ecc048ed9831fd21380593 Mon Sep 17 00:00:00 2001 From: Parker Date: Sat, 20 Jul 2024 00:22:01 -0500 Subject: Add ability to have simple passwords --- code/func/jellyfin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'code/func/jellyfin.py') diff --git a/code/func/jellyfin.py b/code/func/jellyfin.py index 19f1e9a..f31ec04 100644 --- a/code/func/jellyfin.py +++ b/code/func/jellyfin.py @@ -5,7 +5,7 @@ import string import sqlite3 from wonderwords import RandomWord -from global_variables import JELLYFIN_URL, JELLYFIN_HEADERS, ACCOUNT_TIME +from global_variables import JELLYFIN_URL, JELLYFIN_HEADERS, ACCOUNT_TIME, SIMPLE_PASSWORDS """ Create a new Jellyfin account for the user and return the username and password @@ -14,7 +14,10 @@ Create a new Jellyfin account for the user and return the username and password def create_jellyfin_account(user_id): username = RandomWord().word(word_min_length=5, word_max_length=5) - password = "".join(random.choices(string.ascii_lowercase + string.digits, k=15)) + if SIMPLE_PASSWORDS: + password = RandomWord().word(word_min_length=5, word_max_length=10) + else: + password = "".join(random.choices(string.ascii_lowercase + string.digits, k=15)) deletion_time = datetime.datetime.now() + datetime.timedelta(hours=ACCOUNT_TIME) # Create the new Jellyfin account -- cgit v1.2.3-70-g09d2