The Free Software Media System - Server Backend & API
ignore socket error
Luke Pulverenti0619717f38a2
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.csindex 77843ef6b2..0dabcac4be 100644--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs@@ -1748,6 +1748,11 @@ namespace MediaBrowser.Server.Implementations.Sessionpublic void ReportNowViewingItem(string sessionId, string itemId){+ if (string.IsNullOrWhiteSpace(itemId))+ {+ throw new ArgumentNullException("itemId");+ }+var item = _libraryManager.GetItemById(new Guid(itemId));var info = GetItemInfo(item, null, null);diff --git a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.csindex 602bc4876b..ddd7ba53a6 100644--- a/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs+++ b/MediaBrowser.Server.Implementations/Session/SessionWebSocketListener.cs@@ -230,7 +230,12 @@ namespace MediaBrowser.Server.Implementations.Session{var vals = message.Data.Split('|');- _sessionManager.ReportNowViewingItem(session.Id, vals[1]);+ var itemId = vals[1];++ if (!string.IsNullOrWhiteSpace(itemId))+ {+ _sessionManager.ReportNowViewingItem(session.Id, itemId);+ }}}