Process 1 build 0203261953
This commit is contained in:
@@ -1398,6 +1398,24 @@ def set_user_password(username: str, password: str) -> None:
|
||||
)
|
||||
|
||||
|
||||
def sync_jellyfin_password_state(username: str, password: str) -> None:
|
||||
if not username or not password:
|
||||
return
|
||||
password_hash = hash_password(password)
|
||||
timestamp = datetime.now(timezone.utc).isoformat()
|
||||
with _connect() as conn:
|
||||
conn.execute(
|
||||
"""
|
||||
UPDATE users
|
||||
SET password_hash = ?,
|
||||
jellyfin_password_hash = ?,
|
||||
last_jellyfin_auth_at = ?
|
||||
WHERE username = ? COLLATE NOCASE
|
||||
""",
|
||||
(password_hash, password_hash, timestamp, username),
|
||||
)
|
||||
|
||||
|
||||
def set_jellyfin_auth_cache(username: str, password: str) -> None:
|
||||
if not username or not password:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user