aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session/SessionManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-05 01:21:13 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-05 01:21:13 -0400
commited5bf546c1c1498601ea41bd24c12f9cbf7c84e7 (patch)
tree203bc7dce562cb922ea9682b093d368f210cb5f9 /MediaBrowser.Server.Implementations/Session/SessionManager.cs
parentba720ba9573035fd25ded0da2ffe532ebae2f6fd (diff)
fixes #689 - Support grouping latest items
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/SessionManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Session/SessionManager.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/SessionManager.cs b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
index 2d85a3aa7..784719318 100644
--- a/MediaBrowser.Server.Implementations/Session/SessionManager.cs
+++ b/MediaBrowser.Server.Implementations/Session/SessionManager.cs
@@ -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);