1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-12 11:15:43 +02:00

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 @@ public static void BindKernel()
_kernel.Bind<IEpisodeProvider>().To<EpisodeProvider>(); _kernel.Bind<IEpisodeProvider>().To<EpisodeProvider>();
_kernel.Bind<UpcomingEpisodesProvider>().To<UpcomingEpisodesProvider>(); _kernel.Bind<UpcomingEpisodesProvider>().To<UpcomingEpisodesProvider>();
_kernel.Bind<IDiskProvider>().To<DiskProvider>(); _kernel.Bind<IDiskProvider>().To<DiskProvider>();
_kernel.Bind<IDownloadProvider>().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<IExtenalNotificationProvider>().To<ExternalNotificationProvider>();

View File

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

View File

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