Browse Source

remove dupes from library changed web socket event

Luke Pulverenti 12 years ago
parent
commit
34672889e9
1 changed files with 4 additions and 0 deletions
  1. 4 0
      MediaBrowser.ServerApplication/EntryPoints/WebSocketEvents.cs

+ 4 - 0
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)