Removed IXbmcProvider.

pull/6/head
Mark McDowall 14 years ago
parent d63fe6ad56
commit 83ebd89ff8

@ -70,7 +70,7 @@ namespace NzbDrone.Core
_kernel.Bind<IHistoryProvider>().To<HistoryProvider>(); _kernel.Bind<IHistoryProvider>().To<HistoryProvider>();
_kernel.Bind<RootDirProvider>().To<RootDirProvider>(); _kernel.Bind<RootDirProvider>().To<RootDirProvider>();
_kernel.Bind<IExtenalNotificationProvider>().To<ExternalNotificationProvider>(); _kernel.Bind<IExtenalNotificationProvider>().To<ExternalNotificationProvider>();
_kernel.Bind<IXbmcProvider>().To<XbmcProvider>(); _kernel.Bind<XbmcProvider>().To<XbmcProvider>();
_kernel.Bind<IConfigProvider>().To<ConfigProvider>().InSingletonScope(); _kernel.Bind<IConfigProvider>().To<ConfigProvider>().InSingletonScope();
_kernel.Bind<ISyncProvider>().To<SyncProvider>().InSingletonScope(); _kernel.Bind<ISyncProvider>().To<SyncProvider>().InSingletonScope();
_kernel.Bind<IIndexerProvider>().To<IndexerProvider>().InSingletonScope(); _kernel.Bind<IIndexerProvider>().To<IndexerProvider>().InSingletonScope();

@ -192,7 +192,6 @@
<Compile Include="Providers\IRssSyncProvider.cs" /> <Compile Include="Providers\IRssSyncProvider.cs" />
<Compile Include="Providers\ITimerProvider.cs" /> <Compile Include="Providers\ITimerProvider.cs" />
<Compile Include="Providers\IUpcomingEpisodesProvider.cs" /> <Compile Include="Providers\IUpcomingEpisodesProvider.cs" />
<Compile Include="Providers\IXbmcProvider.cs" />
<Compile Include="Providers\PostProcessingProvider.cs" /> <Compile Include="Providers\PostProcessingProvider.cs" />
<Compile Include="Providers\QualityProvider.cs" /> <Compile Include="Providers\QualityProvider.cs" />
<Compile Include="Providers\RenameProvider.cs" /> <Compile Include="Providers\RenameProvider.cs" />

@ -13,12 +13,12 @@ namespace NzbDrone.Core.Providers
public class ExternalNotificationProvider : IExtenalNotificationProvider public class ExternalNotificationProvider : IExtenalNotificationProvider
{ {
private readonly IConfigProvider _configProvider; private readonly IConfigProvider _configProvider;
private readonly IXbmcProvider _xbmcProvider; private readonly XbmcProvider _xbmcProvider;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public ExternalNotificationProvider(IConfigProvider configProvider, IXbmcProvider xbmcProvider) public ExternalNotificationProvider(IConfigProvider configProvider, XbmcProvider xbmcProvider)
{ {
_configProvider = configProvider; _configProvider = configProvider;
_xbmcProvider = xbmcProvider; _xbmcProvider = xbmcProvider;

@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Providers
{
public interface IXbmcProvider
{
void Notify(string header, string message);
void Update(int seriesId);
void Clean();
}
}

@ -10,7 +10,7 @@ using NzbDrone.Core.Providers.Core;
namespace NzbDrone.Core.Providers namespace NzbDrone.Core.Providers
{ {
public class XbmcProvider : IXbmcProvider public class XbmcProvider
{ {
private readonly IConfigProvider _configProvider; private readonly IConfigProvider _configProvider;
private readonly HttpProvider _httpProvider; private readonly HttpProvider _httpProvider;
@ -23,9 +23,9 @@ namespace NzbDrone.Core.Providers
_httpProvider = httpProvider; _httpProvider = httpProvider;
} }
#region IXbmcProvider Members #region XbmcProvider Members
public void Notify(string header, string message) public virtual void Notify(string header, string message)
{ {
//Get time in seconds and convert to ms //Get time in seconds and convert to ms
var time = Convert.ToInt32(_configProvider.GetValue("XbmcDisplayTime", "3", true)) * 1000; var time = Convert.ToInt32(_configProvider.GetValue("XbmcDisplayTime", "3", true)) * 1000;
@ -47,7 +47,7 @@ namespace NzbDrone.Core.Providers
} }
} }
public void Update(int seriesId) public virtual void Update(int seriesId)
{ {
foreach (var host in _configProvider.GetValue("XbmcHosts", "localhost:80", true).Split(',')) foreach (var host in _configProvider.GetValue("XbmcHosts", "localhost:80", true).Split(','))
{ {
@ -68,7 +68,7 @@ namespace NzbDrone.Core.Providers
} }
} }
public void Clean() public virtual void Clean()
{ {
foreach (var host in _configProvider.GetValue("XbmcHosts", "localhost:80", true).Split(',')) foreach (var host in _configProvider.GetValue("XbmcHosts", "localhost:80", true).Split(','))
{ {

Loading…
Cancel
Save