diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Roku/RokuControllerFactory.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Roku/RokuControllerFactory.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Roku/RokuControllerFactory.cs b/MediaBrowser.Server.Implementations/Roku/RokuControllerFactory.cs new file mode 100644 index 000000000..71f70421a --- /dev/null +++ b/MediaBrowser.Server.Implementations/Roku/RokuControllerFactory.cs @@ -0,0 +1,32 @@ +using MediaBrowser.Common.Net; +using MediaBrowser.Controller; +using MediaBrowser.Controller.Session; +using MediaBrowser.Model.Serialization; +using System; + +namespace MediaBrowser.Server.Implementations.Roku +{ + public class RokuControllerFactory : ISessionControllerFactory + { + private readonly IHttpClient _httpClient; + private readonly IJsonSerializer _json; + private readonly IServerApplicationHost _appHost; + + public RokuControllerFactory(IHttpClient httpClient, IJsonSerializer json, IServerApplicationHost appHost) + { + _httpClient = httpClient; + _json = json; + _appHost = appHost; + } + + public ISessionController GetSessionController(SessionInfo session) + { + if (string.Equals(session.Client, "roku", StringComparison.OrdinalIgnoreCase)) + { + return new RokuSessionController(_httpClient, _json, _appHost, session); + } + + return null; + } + } +} |
