Removed IXbmcProvider.

This commit is contained in:
Mark McDowall 2011-04-08 08:15:51 -07:00
parent d63fe6ad56
commit 83ebd89ff8
5 changed files with 8 additions and 23 deletions

View File

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

View File

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

View File

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

View File

@ -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();
}
}

View File

@ -10,7 +10,7 @@ using NzbDrone.Core.Providers.Core;
namespace NzbDrone.Core.Providers
{
public class XbmcProvider : IXbmcProvider
public class XbmcProvider
{
private readonly IConfigProvider _configProvider;
private readonly HttpProvider _httpProvider;
@ -23,9 +23,9 @@ namespace NzbDrone.Core.Providers
_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
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(','))
{
@ -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(','))
{