@ -27,6 +27,9 @@ namespace MediaBrowser.Api
[ApiMember(Name = "ControllableByUserId", Description = "Optional. Filter by sessions that a given user is allowed to remote control.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public Guid ? ControllableByUserId { get ; set ; }
[ApiMember(Name = "DeviceId", Description = "Optional. Filter by device id.", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
public string DeviceId { get ; set ; }
}
/// <summary>
@ -248,6 +251,11 @@ namespace MediaBrowser.Api
result = result . Where ( i = > i . SupportsRemoteControl = = request . SupportsRemoteControl . Value ) ;
}
if ( ! string . IsNullOrEmpty ( request . DeviceId ) )
{
result = result . Where ( i = > string . Equals ( i . DeviceId , request . DeviceId , StringComparison . OrdinalIgnoreCase ) ) ;
}
if ( request . ControllableByUserId . HasValue )
{
var user = _userManager . GetUserById ( request . ControllableByUserId . Value ) ;