mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2024-12-23 01:20:12 +00:00
add pw reset debug message; changed watchdog 'created' to 'modified'
Added an extra debugging message to tell the file being read for a password reset, and changed watchdog form using 'created' events to 'modified', otherwise there may be issues where the file is read before it is fully written.
This commit is contained in:
parent
60cd54f436
commit
e6eda227fa
@ -166,8 +166,9 @@ class Handler(FileSystemEventHandler):
|
|||||||
def on_any_event(event):
|
def on_any_event(event):
|
||||||
if event.is_directory:
|
if event.is_directory:
|
||||||
return None
|
return None
|
||||||
elif (event.event_type == 'created' and
|
elif (event.event_type == 'modified' and
|
||||||
'passwordreset' in event.src_path):
|
'passwordreset' in event.src_path):
|
||||||
|
log.debug(f'Password reset file: {event.src_path}')
|
||||||
with open(event.src_path, 'r') as f:
|
with open(event.src_path, 'r') as f:
|
||||||
reset = json.load(f)
|
reset = json.load(f)
|
||||||
log.info(f'New password reset for {reset["UserName"]}')
|
log.info(f'New password reset for {reset["UserName"]}')
|
||||||
|
Loading…
Reference in New Issue
Block a user