|
|
|
@ -21,7 +21,29 @@ namespace NzbDrone.Core.Indexers.Rarbg
|
|
|
|
|
|
|
|
|
|
public override IndexerPrivacy Privacy => IndexerPrivacy.Public;
|
|
|
|
|
|
|
|
|
|
public override IndexerCapabilities Capabilities => new IndexerCapabilities
|
|
|
|
|
public override IndexerCapabilities Capabilities => SetCapabilities();
|
|
|
|
|
|
|
|
|
|
public override TimeSpan RateLimit => TimeSpan.FromSeconds(2);
|
|
|
|
|
|
|
|
|
|
public Rarbg(IRarbgTokenProvider tokenProvider, IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger)
|
|
|
|
|
: base(httpClient, indexerStatusService, configService, logger)
|
|
|
|
|
{
|
|
|
|
|
_tokenProvider = tokenProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override IIndexerRequestGenerator GetRequestGenerator()
|
|
|
|
|
{
|
|
|
|
|
return new RarbgRequestGenerator(_tokenProvider) { Settings = Settings, BaseUrl = BaseUrl };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override IParseIndexerResponse GetParser()
|
|
|
|
|
{
|
|
|
|
|
return new RarbgParser(Capabilities);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private IndexerCapabilities SetCapabilities()
|
|
|
|
|
{
|
|
|
|
|
var caps = new IndexerCapabilities
|
|
|
|
|
{
|
|
|
|
|
TvSearchParams = new List<TvSearchParam>
|
|
|
|
|
{
|
|
|
|
@ -41,22 +63,37 @@ namespace NzbDrone.Core.Indexers.Rarbg
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public override TimeSpan RateLimit => TimeSpan.FromSeconds(2);
|
|
|
|
|
|
|
|
|
|
public Rarbg(IRarbgTokenProvider tokenProvider, IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, Logger logger)
|
|
|
|
|
: base(httpClient, indexerStatusService, configService, logger)
|
|
|
|
|
{
|
|
|
|
|
_tokenProvider = tokenProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override IIndexerRequestGenerator GetRequestGenerator()
|
|
|
|
|
{
|
|
|
|
|
return new RarbgRequestGenerator(_tokenProvider) { Settings = Settings, BaseUrl = BaseUrl };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override IParseIndexerResponse GetParser()
|
|
|
|
|
{
|
|
|
|
|
return new RarbgParser();
|
|
|
|
|
caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.XXX, "XXX (18+)");
|
|
|
|
|
caps.Categories.AddCategoryMapping(14, NewznabStandardCategory.MoviesSD, "Movies/XVID");
|
|
|
|
|
caps.Categories.AddCategoryMapping(17, NewznabStandardCategory.MoviesSD, "Movies/x264");
|
|
|
|
|
caps.Categories.AddCategoryMapping(18, NewznabStandardCategory.TVSD, "TV Episodes");
|
|
|
|
|
caps.Categories.AddCategoryMapping(23, NewznabStandardCategory.AudioMP3, "Music/MP3");
|
|
|
|
|
caps.Categories.AddCategoryMapping(25, NewznabStandardCategory.AudioLossless, "Music/FLAC");
|
|
|
|
|
caps.Categories.AddCategoryMapping(27, NewznabStandardCategory.PCGames, "Games/PC ISO");
|
|
|
|
|
caps.Categories.AddCategoryMapping(28, NewznabStandardCategory.PCGames, "Games/PC RIP");
|
|
|
|
|
caps.Categories.AddCategoryMapping(32, NewznabStandardCategory.ConsoleXBox360, "Games/XBOX-360");
|
|
|
|
|
caps.Categories.AddCategoryMapping(33, NewznabStandardCategory.PCISO, "Software/PC ISO");
|
|
|
|
|
caps.Categories.AddCategoryMapping(35, NewznabStandardCategory.BooksEBook, "e-Books");
|
|
|
|
|
caps.Categories.AddCategoryMapping(40, NewznabStandardCategory.ConsolePS3, "Games/PS3");
|
|
|
|
|
caps.Categories.AddCategoryMapping(41, NewznabStandardCategory.TVHD, "TV HD Episodes");
|
|
|
|
|
caps.Categories.AddCategoryMapping(42, NewznabStandardCategory.MoviesBluRay, "Movies/Full BD");
|
|
|
|
|
caps.Categories.AddCategoryMapping(44, NewznabStandardCategory.MoviesHD, "Movies/x264/1080");
|
|
|
|
|
caps.Categories.AddCategoryMapping(45, NewznabStandardCategory.MoviesHD, "Movies/x264/720");
|
|
|
|
|
caps.Categories.AddCategoryMapping(46, NewznabStandardCategory.MoviesBluRay, "Movies/BD Remux");
|
|
|
|
|
caps.Categories.AddCategoryMapping(47, NewznabStandardCategory.Movies3D, "Movies/x264/3D");
|
|
|
|
|
caps.Categories.AddCategoryMapping(48, NewznabStandardCategory.MoviesHD, "Movies/XVID/720");
|
|
|
|
|
caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.TVUHD, "TV UHD Episodes");
|
|
|
|
|
|
|
|
|
|
// torrentapi.org returns "Movies/TV-UHD-episodes" for some reason
|
|
|
|
|
// possibly because thats what the category is called on the /top100.php page
|
|
|
|
|
caps.Categories.AddCategoryMapping(49, NewznabStandardCategory.TVUHD, "Movies/TV-UHD-episodes");
|
|
|
|
|
caps.Categories.AddCategoryMapping(50, NewznabStandardCategory.MoviesUHD, "Movies/x264/4k");
|
|
|
|
|
caps.Categories.AddCategoryMapping(51, NewznabStandardCategory.MoviesUHD, "Movies/x265/4k");
|
|
|
|
|
caps.Categories.AddCategoryMapping(52, NewznabStandardCategory.MoviesUHD, "Movs/x265/4k/HDR");
|
|
|
|
|
caps.Categories.AddCategoryMapping(53, NewznabStandardCategory.ConsolePS4, "Games/PS4");
|
|
|
|
|
caps.Categories.AddCategoryMapping(54, NewznabStandardCategory.MoviesHD, "Movies/x265/1080");
|
|
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override object RequestAction(string action, IDictionary<string, string> query)
|
|
|
|
|