fixes #689 - Support grouping latest items

This commit is contained in:
Luke Pulverenti
2014-07-05 01:21:13 -04:00
parent ba720ba957
commit ed5bf546c1
14 changed files with 586 additions and 392 deletions

View File

@@ -616,6 +616,20 @@ namespace MediaBrowser.Server.Implementations.Session
info.MediaSourceId = info.ItemId;
}
if (!string.IsNullOrWhiteSpace(info.ItemId) && libraryItem != null)
{
var current = session.NowPlayingItem;
if (current == null || !string.Equals(current.Id, info.ItemId, StringComparison.OrdinalIgnoreCase))
{
info.Item = GetItemInfo(libraryItem, libraryItem, info.MediaSourceId);
}
else
{
info.Item = current;
}
}
RemoveNowPlayingItem(session);
var users = GetUsers(session);