aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-07-10 22:30:36 -0400
committerLuke <luke.pulverenti@gmail.com>2015-07-10 22:30:36 -0400
commit63f9abd4d65b7b7fd43f7ec7faf510075285ed69 (patch)
tree9cba4db7741db461cd7995d39d30d70483f7ae6d /MediaBrowser.Server.Implementations/Session/SessionManager.cs
parentffe60d453d2610db290bff0a3319dbe7c0ceba04 (diff)
parentfe7fd7cd266be0fe8c0cc2be095cc0b267931ea9 (diff)
Merge pull request #1127 from MediaBrowser/dev
3.0.5641.5
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index f657d5403..560d203db 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<BaseItem> 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<BaseItem>();
+ }
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<BaseItem>();
+ }
+
return _musicManager.GetInstantMixFromItem(item, user);
}