display additional users in dashboard

This commit is contained in:
Luke Pulverenti
2014-01-03 21:59:20 -05:00
parent 135168b0e0
commit f93fb4650c
5 changed files with 18 additions and 12 deletions

View File

@@ -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));
}
}
}