jellyfin-server/MediaBrowser.Dlna/PlayTo/PlayToServerEntryPoint.cs

41 lines
1.2 KiB
C#
Raw Normal View History

2014-02-27 02:44:00 +00:00
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Dlna.PlayTo
{
public class PlayToServerEntryPoint : IServerEntryPoint
{
private bool _disposed;
2014-02-27 18:00:49 +00:00
2014-02-27 02:44:00 +00:00
private readonly PlayToManager _manager;
public PlayToServerEntryPoint(ILogManager logManager, ISessionManager sessionManager, IUserManager userManager, IHttpClient httpClient, INetworkManager networkManager, IItemRepository itemRepository, ILibraryManager libraryManager)
{
2014-02-27 18:00:49 +00:00
_manager = new PlayToManager(logManager.GetLogger("PlayTo"), sessionManager, httpClient, itemRepository, libraryManager, networkManager, userManager);
2014-02-27 02:44:00 +00:00
}
2014-02-27 18:00:49 +00:00
public void Run()
2014-02-27 02:44:00 +00:00
{
2014-02-27 19:50:27 +00:00
_manager.Start();
2014-02-27 02:44:00 +00:00
}
#region Dispose
public void Dispose()
{
if (!_disposed)
{
_disposed = true;
_manager.Stop();
_manager.Dispose();
}
}
#endregion
}
}