Removed IDownloadProvider

This commit is contained in:
Mark McDowall 2011-04-08 08:36:34 -07:00
parent 0ee4f8cc9b
commit c77a88dd2f
5 changed files with 6 additions and 16 deletions

View File

@ -66,7 +66,7 @@ namespace NzbDrone.Core
_kernel.Bind<IEpisodeProvider>().To<EpisodeProvider>();
_kernel.Bind<UpcomingEpisodesProvider>().To<UpcomingEpisodesProvider>();
_kernel.Bind<IDiskProvider>().To<DiskProvider>();
_kernel.Bind<IDownloadProvider>().To<SabProvider>();
_kernel.Bind<SabProvider>().To<SabProvider>();
_kernel.Bind<IHistoryProvider>().To<HistoryProvider>();
_kernel.Bind<RootDirProvider>().To<RootDirProvider>();
_kernel.Bind<IExtenalNotificationProvider>().To<ExternalNotificationProvider>();

View File

@ -213,7 +213,6 @@
<Compile Include="Providers\Core\ConfigProvider.cs" />
<Compile Include="Providers\EpisodeProvider.cs" />
<Compile Include="Providers\Core\HttpProvider.cs" />
<Compile Include="Providers\IDownloadProvider.cs" />
<Compile Include="Providers\IEpisodeProvider.cs" />
<Compile Include="Providers\ISeasonProvider.cs" />
<Compile Include="Providers\ISeriesProvider.cs" />

View File

@ -12,4 +12,4 @@ namespace NzbDrone.Core.Providers
bool StartSearch();
bool StartSearch(int seriesId);
}
}
}

View File

@ -1,9 +0,0 @@
namespace NzbDrone.Core.Providers
{
public interface IDownloadProvider
{
bool AddByUrl(string url, string title); //Should accept something other than string (NzbInfo?) returns success or failure
bool IsInQueue(string title); //Should accept something other than string (Episode?) returns bool
bool AddById(string id, string title);
}
}

View File

@ -7,7 +7,7 @@ using NzbDrone.Core.Providers.Core;
namespace NzbDrone.Core.Providers
{
public class SabProvider : IDownloadProvider
public class SabProvider
{
private readonly IConfigProvider _config;
private readonly HttpProvider _http;
@ -22,7 +22,7 @@ namespace NzbDrone.Core.Providers
#region IDownloadProvider Members
public bool AddByUrl(string url, string title)
public virtual bool AddByUrl(string url, string title)
{
const string mode = "addurl";
string cat = _config.GetValue("SabTvCategory", String.Empty, true);
@ -45,7 +45,7 @@ namespace NzbDrone.Core.Providers
return false;
}
public bool IsInQueue(string title)
public virtual bool IsInQueue(string title)
{
const string action = "mode=queue&output=xml";
string request = GetSabRequest(action);
@ -71,7 +71,7 @@ namespace NzbDrone.Core.Providers
return false; //Not in Queue
}
public bool AddById(string id, string title)
public virtual bool AddById(string id, string title)
{
//mode=addid&name=333333&pp=3&script=customscript.cmd&cat=Example&priority=-1