fixes
This commit is contained in:
@@ -111,12 +111,15 @@ class LibraryEventHandler(FileSystemEventHandler):
|
||||
def start_watcher(library_id: int, library_path: str):
|
||||
if library_id in _observers:
|
||||
return
|
||||
handler = LibraryEventHandler(library_id, library_path)
|
||||
observer = Observer()
|
||||
observer.schedule(handler, library_path, recursive=True)
|
||||
observer.start()
|
||||
_observers[library_id] = observer
|
||||
log.info("Started watcher for library %d at %s", library_id, library_path)
|
||||
try:
|
||||
handler = LibraryEventHandler(library_id, library_path)
|
||||
observer = Observer()
|
||||
observer.schedule(handler, library_path, recursive=True)
|
||||
observer.start()
|
||||
_observers[library_id] = observer
|
||||
log.info("Started watcher for library %d at %s", library_id, library_path)
|
||||
except Exception:
|
||||
log.exception("Failed to start watcher for library %d at %s", library_id, library_path)
|
||||
|
||||
|
||||
def stop_watcher(library_id: int):
|
||||
|
||||
Reference in New Issue
Block a user