From bb77e85dedebf2a6e3656d4416b29f2d8cf9e2e5 Mon Sep 17 00:00:00 2001 From: Parker Date: Sat, 20 Jul 2024 00:10:38 -0500 Subject: [PATCH] Make usernames 5 letter words --- code/func/jellyfin.py | 3 ++- requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/func/jellyfin.py b/code/func/jellyfin.py index c255ac2..19f1e9a 100644 --- a/code/func/jellyfin.py +++ b/code/func/jellyfin.py @@ -3,6 +3,7 @@ import requests import random import string import sqlite3 +from wonderwords import RandomWord from global_variables import JELLYFIN_URL, JELLYFIN_HEADERS, ACCOUNT_TIME @@ -12,7 +13,7 @@ Create a new Jellyfin account for the user and return the username and password def create_jellyfin_account(user_id): - username = "".join(random.choices(string.ascii_lowercase + string.digits, k=5)) + username = RandomWord().word(word_min_length=5, word_max_length=5) password = "".join(random.choices(string.ascii_lowercase + string.digits, k=15)) deletion_time = datetime.datetime.now() + datetime.timedelta(hours=ACCOUNT_TIME) diff --git a/requirements.txt b/requirements.txt index d6d334e..fcab068 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ colorlog==6.8.2 discord.py==2.3.2 requests==2.32.0 -humanize==4.9.0 \ No newline at end of file +humanize==4.9.0 +wonderwords==2.2.0 \ No newline at end of file