mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fix script error on now playing page
This commit is contained in:
parent
14f05c9bd0
commit
47f91baaa3
@ -967,7 +967,13 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||||||
|
|
||||||
private IEnumerable<BaseItem> TranslateItemForPlayback(string id, User user)
|
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;
|
var byName = item as IItemByName;
|
||||||
|
|
||||||
@ -1011,6 +1017,12 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||||||
{
|
{
|
||||||
var item = _libraryManager.GetItemById(id);
|
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);
|
return _musicManager.GetInstantMixFromItem(item, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user