aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-07-05 14:34:52 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-07-05 14:34:52 -0400
commit47f91baaa30a6e9f69b03f0a89d7a45a362a3f24 (patch)
treef4213d987f3d46a15f4cfc3bca13c3ccbf8df370
parent14f05c9bd073b95e3ac817ba282ef4204c001f75 (diff)
fix script error on now playing page
-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);
}