added model classes for remote control

This commit is contained in:
Luke Pulverenti
2013-05-09 18:43:11 -04:00
parent 2b28320764
commit 35a7986b3f
22 changed files with 289 additions and 30 deletions

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Controller.Session;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Session;
using ServiceStack.ServiceHost;
using System.Collections.Generic;
@@ -11,7 +12,7 @@ namespace MediaBrowser.Api
/// </summary>
[Route("/Sessions", "GET")]
[Api(("Gets a list of sessions"))]
public class GetSessions : IReturn<List<SessionInfo>>
public class GetSessions : IReturn<List<SessionInfoDto>>
{
/// <summary>
/// Gets or sets a value indicating whether this instance is recent.
@@ -48,7 +49,7 @@ namespace MediaBrowser.Api
{
var result = request.IsRecent ? _sessionManager.RecentConnections : _sessionManager.AllConnections;
return ToOptimizedResult(result.ToList());
return ToOptimizedResult(result.Select(SessionInfoDtoBuilder.GetSessionInfoDto).ToList());
}
}
}