From 34672889e99a7aed84a4bc3812fa65c907999f52 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 9 May 2013 09:48:13 -0400 Subject: [PATCH] remove dupes from library changed web socket event --- MediaBrowser.ServerApplication/EntryPoints/WebSocketEvents.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MediaBrowser.ServerApplication/EntryPoints/WebSocketEvents.cs b/MediaBrowser.ServerApplication/EntryPoints/WebSocketEvents.cs index e80c5cc1c9..006e78bc76 100644 --- a/MediaBrowser.ServerApplication/EntryPoints/WebSocketEvents.cs +++ b/MediaBrowser.ServerApplication/EntryPoints/WebSocketEvents.cs @@ -275,6 +275,10 @@ namespace MediaBrowser.ServerApplication.EntryPoints { lock (_libraryChangedSyncLock) { + // Remove dupes in case some were saved multiple times + LibraryUpdateInfo.Folders = LibraryUpdateInfo.Folders.Distinct().ToList(); + LibraryUpdateInfo.ItemsUpdated = LibraryUpdateInfo.ItemsUpdated.Distinct().ToList(); + _serverManager.SendWebSocketMessage("LibraryChanged", LibraryUpdateInfo); if (LibraryUpdateTimer != null)