aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Core/IO/LibraryMonitor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Core/IO/LibraryMonitor.cs')
-rw-r--r--Emby.Server.Core/IO/LibraryMonitor.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Emby.Server.Core/IO/LibraryMonitor.cs b/Emby.Server.Core/IO/LibraryMonitor.cs
index 0f0640a38..ebc5e5e55 100644
--- a/Emby.Server.Core/IO/LibraryMonitor.cs
+++ b/Emby.Server.Core/IO/LibraryMonitor.cs
@@ -332,7 +332,13 @@ namespace Emby.Server.Core.IO
NotifyFilters.Attributes;
newWatcher.Created += watcher_Changed;
- newWatcher.Deleted += watcher_Changed;
+
+ // Seeing mono crashes on background threads we can't catch, testing if this might help
+ if (_environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows)
+ {
+ newWatcher.Deleted += watcher_Changed;
+ }
+
newWatcher.Renamed += watcher_Changed;
newWatcher.Changed += watcher_Changed;