aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Session/SessionInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Session/SessionInfo.cs')
-rw-r--r--MediaBrowser.Controller/Session/SessionInfo.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs
index ce07f5dc4..b05a68a84 100644
--- a/MediaBrowser.Controller/Session/SessionInfo.cs
+++ b/MediaBrowser.Controller/Session/SessionInfo.cs
@@ -2,6 +2,7 @@
using MediaBrowser.Model.Session;
using System;
using System.Collections.Generic;
+using System.Linq;
namespace MediaBrowser.Controller.Session
{
@@ -14,10 +15,10 @@ namespace MediaBrowser.Controller.Session
{
QueueableMediaTypes = new List<string>();
- AdditionalUsersPresent = new List<SessionUserInfo>();
+ AdditionalUsers = new List<SessionUserInfo>();
}
- public List<SessionUserInfo> AdditionalUsersPresent { get; set; }
+ public List<SessionUserInfo> AdditionalUsers { get; set; }
/// <summary>
/// Gets or sets the remote end point.
@@ -172,5 +173,10 @@ namespace MediaBrowser.Controller.Session
return false;
}
}
+
+ public bool ContainsUser(Guid userId)
+ {
+ return (UserId ?? Guid.Empty) == UserId || AdditionalUsers.Any(i => userId == new Guid(i.UserId));
+ }
}
}