New: Rewrite of download decision engine.

This commit is contained in:
kay.one 2012-02-06 21:08:07 -08:00
commit 5717b7f596
60 changed files with 2013 additions and 1745 deletions

View file

@ -11,6 +11,9 @@ namespace NzbDrone.Core.Providers.Indexer
{
public class Newzbin : IndexerBase
{
private const string ROOT_DOMAIN = "https://www.newzbin2.es";
[Inject]
public Newzbin(HttpProvider httpProvider, ConfigProvider configProvider)
: base(httpProvider, configProvider)
@ -25,7 +28,7 @@ namespace NzbDrone.Core.Providers.Indexer
{
return new[]
{
"https://www.newzbin2.es/browse/category/p/tv?" + URL_PARAMS
ROOT_DOMAIN + "/browse/category/p/tv?" + URL_PARAMS
};
}
}
@ -50,7 +53,7 @@ namespace NzbDrone.Core.Providers.Indexer
return new List<string>
{
String.Format(
@"https://www.newzbin.es/search/query/?q={0}+{1}x{2:00}&fpn=p&searchaction=Go&category=8&{3}",
ROOT_DOMAIN + @"/search/query/?q={0}+{1}x{2:00}&fpn=p&searchaction=Go&category=8&{3}",
seriesTitle, seasonNumber,episodeNumber, URL_PARAMS)
};
}
@ -60,7 +63,7 @@ namespace NzbDrone.Core.Providers.Indexer
return new List<string>
{
String.Format(
@"https://www.newzbin.es/search/query/?q={0}+Season+{1}&fpn=p&searchaction=Go&category=8&{2}",
ROOT_DOMAIN + @"/search/query/?q={0}+Season+{1}&fpn=p&searchaction=Go&category=8&{2}",
seriesTitle, seasonNumber, URL_PARAMS)
};
}
@ -70,7 +73,7 @@ namespace NzbDrone.Core.Providers.Indexer
return new List<string>
{
String.Format(
@"https://www.newzbin.es/search/query/?q={0}+{1:yyyy-MM-dd}&fpn=p&searchaction=Go&category=8&{2}",
ROOT_DOMAIN + @"/search/query/?q={0}+{1:yyyy-MM-dd}&fpn=p&searchaction=Go&category=8&{2}",
seriesTitle, date, URL_PARAMS)
};
}
@ -80,7 +83,7 @@ namespace NzbDrone.Core.Providers.Indexer
return new List<string>
{
String.Format(
@"https://www.newzbin.es/search/query/?q={0}+{1}x{2}&fpn=p&searchaction=Go&category=8&{3}",
ROOT_DOMAIN + @"/search/query/?q={0}+{1}x{2}&fpn=p&searchaction=Go&category=8&{3}",
seriesTitle, seasonNumber, episodeWildcard, URL_PARAMS)
};
}