diff options
| author | Tavares André <tavares_and@hotmail.com> | 2015-07-16 20:19:12 +0200 |
|---|---|---|
| committer | Tavares André <tavares_and@hotmail.com> | 2015-07-16 20:19:12 +0200 |
| commit | 8fd5a8af8d8b6d371a0a2c44d0c7c6809410125c (patch) | |
| tree | c23e4a4afc33c35318eb2a26f51b28d3a6bb35da /MediaBrowser.Server.Implementations/Session/SessionManager.cs | |
| parent | 0fa55fd6de42b683bcdcc0c632f4db1436bca36d (diff) | |
| parent | f1ad56a7deaef79f6dcb2b871de727b8e4af3371 (diff) | |
Merge branch 'dev' of https://github.com/MediaBrowser/MediaBrowser into dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/SessionManager.cs | 14 |
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); } |
