diff --git a/README.md b/README.md index a1f066c..ffbd42a 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ A basic account management system for [Jellyfin](https://github.com/jellyfin/jel * pytz * python-dateutil * watchdog +* packaging ``` ### Install @@ -120,6 +121,8 @@ contact_message = Need help? contact me. help_message = Enter your details to create an account. ; Displayed when an account is created. success_message = Your account has been created. Click below to continue to Jellyfin. +; When true, disables username input on invite form and sets the Jellyfin username to the email address +no_username = false [password_validation] ; Enables password validation. @@ -182,7 +185,7 @@ api_key = your api key encryption = starttls server = smtp.jellyf.in ; Uses SMTP_SSL, so make sure the port is for this, not starttls. -port = 587 +port = 465 password = smtp password [files] diff --git a/jellyfin_accounts/__init__.py b/jellyfin_accounts/__init__.py index 4d86ef9..f35352d 100755 --- a/jellyfin_accounts/__init__.py +++ b/jellyfin_accounts/__init__.py @@ -106,6 +106,10 @@ for key in ["user_configuration", "user_displayprefs"]: log.debug(f"Using default {key}") config["files"][key] = str(data_dir / (key + ".json")) +if "no_username" not in config["email"]: + config["email"]["no_username"] = "false" + log.debug("Set no_username to false") + with open(config["files"]["invites"], "r") as f: temp_invites = json.load(f) if "invites" in temp_invites: diff --git a/jellyfin_accounts/data/config-default.ini b/jellyfin_accounts/data/config-default.ini index ce8da3b..3c1541d 100644 --- a/jellyfin_accounts/data/config-default.ini +++ b/jellyfin_accounts/data/config-default.ini @@ -49,7 +49,9 @@ number = 1 special = 0 [email] -; Leave this whole section if you aren't using any email-related features. +; When true, disables username input on invite form and sets the Jellyfin username to the email address +no_username = false +; Leave the rest of this section if you aren't using any email-related features. use_24h = true ; Date format follows datetime's strftime. date_format = %d/%m/%y diff --git a/jellyfin_accounts/data/templates/form.html b/jellyfin_accounts/data/templates/form.html index ce6e1ca..8397c28 100644 --- a/jellyfin_accounts/data/templates/form.html +++ b/jellyfin_accounts/data/templates/form.html @@ -68,12 +68,14 @@