@ -241,11 +241,23 @@ namespace MediaBrowser.Api.Session
[ApiMember(Name = "SupportsSync", Description = "Determines whether sync is supported.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "POST")]
public bool SupportsSync { get ; set ; }
[ApiMember(Name = "SupportsUniqueIdentifier", Description = "Determines whether the device supports a unique identifier.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "POST")]
public bool SupportsUniqueIdentifier { get ; set ; }
}
[Route("/Sessions/Capabilities/Full", "POST", Summary = "Updates capabilities for a device")]
[Authenticated]
public class PostFullCapabilities : ClientCapabilities , IReturnVoid
{
/// <summary>
/// Gets or sets the id.
/// </summary>
/// <value>The id.</value>
[ApiMember(Name = "Id", Description = "Session Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]
public string Id { get ; set ; }
}
[Route("/Sessions/Logout", "POST", Summary = "Reports that a session has ended")]
[Authenticated]
public class ReportSessionEnded : IReturnVoid
@ -529,5 +541,14 @@ namespace MediaBrowser.Api.Session
SupportsUniqueIdentifier = request . SupportsUniqueIdentifier
} ) ;
}
public void Post ( PostFullCapabilities request )
{
if ( string . IsNullOrWhiteSpace ( request . Id ) )
{
request . Id = GetSession ( ) . Id ;
}
_sessionManager . ReportCapabilities ( request . Id , request ) ;
}
}
}