diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs index f657d5403c..560d203db7 100644 --- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs +++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs @@ -967,7 +967,13 @@ namespace MediaBrowser.Server.Implementations.Session private IEnumerable TranslateItemForPlayback(string id, User user) { - var item = _libraryManager.GetItemById(new Guid(id)); + var item = _libraryManager.GetItemById(id); + + if (item == null) + { + _logger.Error("A non-existant item Id {0} was passed into TranslateItemForPlayback", id); + return new List(); + } var byName = item as IItemByName; @@ -1011,6 +1017,12 @@ namespace MediaBrowser.Server.Implementations.Session { var item = _libraryManager.GetItemById(id); + if (item == null) + { + _logger.Error("A non-existant item Id {0} was passed into TranslateItemForInstantMix", id); + return new List(); + } + return _musicManager.GetInstantMixFromItem(item, user); }