2015-08-04 11:14:16 -07:00
|
|
|
|
using MediaBrowser.Common.Configuration;
|
|
|
|
|
using MediaBrowser.Common.Security;
|
|
|
|
|
using MediaBrowser.Controller.Plugins;
|
|
|
|
|
using MediaBrowser.Model.LiveTv;
|
2015-07-28 20:42:03 -07:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|
|
|
|
{
|
|
|
|
|
public class EntryPoint : IServerEntryPoint
|
|
|
|
|
{
|
2015-08-04 11:14:16 -07:00
|
|
|
|
private readonly IConfigurationManager _config;
|
|
|
|
|
private readonly ISecurityManager _manager;
|
|
|
|
|
|
|
|
|
|
public EntryPoint(IConfigurationManager config, ISecurityManager manager)
|
|
|
|
|
{
|
|
|
|
|
_config = config;
|
|
|
|
|
_manager = manager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async void Run()
|
2015-07-28 20:42:03 -07:00
|
|
|
|
{
|
|
|
|
|
EmbyTV.Current.Start();
|
2015-08-04 11:14:16 -07:00
|
|
|
|
|
|
|
|
|
if (GetConfiguration().ListingProviders.Count > 0 || GetConfiguration().TunerHosts.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
await _manager.GetRegistrationStatus("livetvguide").ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private LiveTvOptions GetConfiguration()
|
|
|
|
|
{
|
|
|
|
|
return _config.GetConfiguration<LiveTvOptions>("livetv");
|
2015-07-28 20:42:03 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|