mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2024-12-22 09:00:14 +00:00
Switch back to 'modified' fs event only
Originally i switched this to 'created' because of a Windows issue someone was having, but I believe it was something else i'd done that fixed it. Using 'created' also meant multiple password resets for a user wouldn't be registered, as jellyfin would just overwrite the existing file. Hopefully this doesn't break anything.
This commit is contained in:
parent
81a80afdf2
commit
17aca69583
@ -1,5 +1,6 @@
|
||||
import time
|
||||
import json
|
||||
import platform
|
||||
from watchdog.observers import Observer
|
||||
from watchdog.events import FileSystemEventHandler
|
||||
from jellyfin_accounts.email import Mailgun, Smtp
|
||||
@ -33,8 +34,7 @@ class Handler(FileSystemEventHandler):
|
||||
def on_any_event(event):
|
||||
if event.is_directory:
|
||||
return None
|
||||
elif ((event.event_type == 'modified' or
|
||||
event.event_type == 'created') and
|
||||
elif (event.event_type == 'modified' and
|
||||
'passwordreset' in event.src_path):
|
||||
log.debug(f'Password reset file: {event.src_path}')
|
||||
time.sleep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user