mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2026-02-03 08:01:12 +00:00
Added user email modification to admin page
Pressing the user settings button brings up a list of all jellyfin users, and allows you to add or change their stored email addresses. Additionally, changed emails.json to use user ID instead of username. The program automatically converts the file to the new format at start.
This commit is contained in:
@@ -3,6 +3,7 @@ import json
|
||||
from watchdog.observers import Observer
|
||||
from watchdog.events import FileSystemEventHandler
|
||||
from jellyfin_accounts.email import Mailgun, Smtp
|
||||
from jellyfin_accounts.web_api import jf
|
||||
from __main__ import config
|
||||
from __main__ import email_log as log
|
||||
|
||||
@@ -41,7 +42,8 @@ class Handler(FileSystemEventHandler):
|
||||
try:
|
||||
with open(config['files']['emails'], 'r') as f:
|
||||
emails = json.load(f)
|
||||
address = emails[reset['UserName']]
|
||||
id = jf.getUsers(reset['UserName'], public=False)['Id']
|
||||
address = emails[id]
|
||||
method = config['email']['method']
|
||||
if method == 'mailgun':
|
||||
email = Mailgun(address)
|
||||
|
||||
Reference in New Issue
Block a user