beta fixes

This commit is contained in:
Luke Pulverenti
2014-12-14 15:01:26 -05:00
parent 9df9723fa8
commit 1c1336ac08
12 changed files with 70 additions and 14 deletions

View File

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