Removed IExternalNotificationProvider

This commit is contained in:
Mark McDowall 2011-04-08 09:24:17 -07:00
parent c77a88dd2f
commit f52b399ed6
5 changed files with 8 additions and 25 deletions

View File

@ -69,7 +69,7 @@ namespace NzbDrone.Core
_kernel.Bind<SabProvider>().To<SabProvider>(); _kernel.Bind<SabProvider>().To<SabProvider>();
_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<ExternalNotificationProvider>().To<ExternalNotificationProvider>();
_kernel.Bind<XbmcProvider>().To<XbmcProvider>(); _kernel.Bind<XbmcProvider>().To<XbmcProvider>();
_kernel.Bind<PostProcessingProvider>().To<PostProcessingProvider>(); _kernel.Bind<PostProcessingProvider>().To<PostProcessingProvider>();
_kernel.Bind<IConfigProvider>().To<ConfigProvider>().InSingletonScope(); _kernel.Bind<IConfigProvider>().To<ConfigProvider>().InSingletonScope();

View File

@ -183,7 +183,6 @@
<Compile Include="Providers\Feed\NzbsOrgFeedProvider.cs" /> <Compile Include="Providers\Feed\NzbsOrgFeedProvider.cs" />
<Compile Include="Providers\HistoryProvider.cs" /> <Compile Include="Providers\HistoryProvider.cs" />
<Compile Include="Providers\IBacklogProvider.cs" /> <Compile Include="Providers\IBacklogProvider.cs" />
<Compile Include="Providers\IExtenalNotificationProvider.cs" />
<Compile Include="Providers\IHistoryProvider.cs" /> <Compile Include="Providers\IHistoryProvider.cs" />
<Compile Include="Providers\IIndexerProvider.cs" /> <Compile Include="Providers\IIndexerProvider.cs" />
<Compile Include="Providers\IndexerProvider.cs" /> <Compile Include="Providers\IndexerProvider.cs" />

View File

@ -10,12 +10,11 @@ using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Providers namespace NzbDrone.Core.Providers
{ {
public class ExternalNotificationProvider : IExtenalNotificationProvider public class ExternalNotificationProvider
{ {
private readonly IConfigProvider _configProvider; private readonly IConfigProvider _configProvider;
private readonly XbmcProvider _xbmcProvider; private readonly XbmcProvider _xbmcProvider;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public ExternalNotificationProvider(IConfigProvider configProvider, XbmcProvider xbmcProvider) public ExternalNotificationProvider(IConfigProvider configProvider, XbmcProvider xbmcProvider)
@ -24,8 +23,8 @@ namespace NzbDrone.Core.Providers
_xbmcProvider = xbmcProvider; _xbmcProvider = xbmcProvider;
} }
#region IExternalNotificationProvider Members #region ExternalNotificationProvider Members
public void OnGrab(string message) public virtual void OnGrab(string message)
{ {
var header = "NzbDrone [TV] - Grabbed"; var header = "NzbDrone [TV] - Grabbed";
@ -43,7 +42,7 @@ namespace NzbDrone.Core.Providers
Logger.Trace("XBMC Notifier is not enabled"); Logger.Trace("XBMC Notifier is not enabled");
} }
public void OnDownload(EpisodeRenameModel erm) public virtual void OnDownload(EpisodeRenameModel erm)
{ {
var header = "NzbDrone [TV] - Downloaded"; var header = "NzbDrone [TV] - Downloaded";
var message = EpisodeRenameHelper.GetNewName(erm); var message = EpisodeRenameHelper.GetNewName(erm);
@ -75,7 +74,7 @@ namespace NzbDrone.Core.Providers
throw new NotImplementedException(); throw new NotImplementedException();
} }
public void OnRename(EpisodeRenameModel erm) public virtual void OnRename(EpisodeRenameModel erm)
{ {
var header = "NzbDrone [TV] - Renamed"; var header = "NzbDrone [TV] - Renamed";
var message = EpisodeRenameHelper.GetNewName(erm); var message = EpisodeRenameHelper.GetNewName(erm);

View File

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NzbDrone.Core.Model;
namespace NzbDrone.Core.Providers
{
public interface IExtenalNotificationProvider
{
void OnGrab(string message);
void OnDownload(EpisodeRenameModel erm);
void OnRename(EpisodeRenameModel erm);
}
}

View File

@ -20,7 +20,7 @@ namespace NzbDrone.Core.Providers
private readonly IMediaFileProvider _mediaFileProvider; private readonly IMediaFileProvider _mediaFileProvider;
private readonly IDiskProvider _diskProvider; private readonly IDiskProvider _diskProvider;
private readonly IConfigProvider _configProvider; private readonly IConfigProvider _configProvider;
private readonly IExtenalNotificationProvider _externalNotificationProvider; private readonly ExternalNotificationProvider _externalNotificationProvider;
private Thread _renameThread; private Thread _renameThread;
private List<EpisodeRenameModel> _epsToRename = new List<EpisodeRenameModel>(); private List<EpisodeRenameModel> _epsToRename = new List<EpisodeRenameModel>();
@ -30,7 +30,7 @@ namespace NzbDrone.Core.Providers
public RenameProvider(ISeriesProvider seriesProvider, ISeasonProvider seasonProvider, public RenameProvider(ISeriesProvider seriesProvider, ISeasonProvider seasonProvider,
IEpisodeProvider episodeProvider, IMediaFileProvider mediaFileProvider, IEpisodeProvider episodeProvider, IMediaFileProvider mediaFileProvider,
IDiskProvider diskProvider, IConfigProvider configProvider, IDiskProvider diskProvider, IConfigProvider configProvider,
IExtenalNotificationProvider extenalNotificationProvider) ExternalNotificationProvider extenalNotificationProvider)
{ {
_seriesProvider = seriesProvider; _seriesProvider = seriesProvider;
_seasonProvider = seasonProvider; _seasonProvider = seasonProvider;