mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-17 05:01:54 +01:00
Fixed: (Nebulance) CS cleanup
This commit is contained in:
parent
989564dbce
commit
7729eb398a
1 changed files with 10 additions and 22 deletions
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
public class Nebulance : TorrentIndexerBase<NebulanceSettings>
|
||||
{
|
||||
public override string Name => "Nebulance";
|
||||
public override string[] IndexerUrls => new string[] { "https://nebulance.io/" };
|
||||
public override string[] IndexerUrls => new[] { "https://nebulance.io/" };
|
||||
public override string Description => "Nebulance (NBL) is a ratioless Private Torrent Tracker for TV";
|
||||
public override string Language => "en-US";
|
||||
public override Encoding Encoding => Encoding.UTF8;
|
||||
|
|
@ -41,7 +41,7 @@ public override IIndexerRequestGenerator GetRequestGenerator()
|
|||
|
||||
public override IParseIndexerResponse GetParser()
|
||||
{
|
||||
return new NebulanceParser(Settings, Capabilities.Categories);
|
||||
return new NebulanceParser(Settings);
|
||||
}
|
||||
|
||||
private IndexerCapabilities SetCapabilities()
|
||||
|
|
@ -49,9 +49,9 @@ private IndexerCapabilities SetCapabilities()
|
|||
var caps = new IndexerCapabilities
|
||||
{
|
||||
TvSearchParams = new List<TvSearchParam>
|
||||
{
|
||||
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId, TvSearchParam.TvMazeId
|
||||
}
|
||||
{
|
||||
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep, TvSearchParam.ImdbId, TvSearchParam.TvMazeId
|
||||
}
|
||||
};
|
||||
|
||||
caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TV);
|
||||
|
|
@ -67,10 +67,6 @@ public class NebulanceRequestGenerator : IIndexerRequestGenerator
|
|||
public NebulanceSettings Settings { get; set; }
|
||||
public IndexerCapabilities Capabilities { get; set; }
|
||||
|
||||
public NebulanceRequestGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
private IEnumerable<IndexerRequest> GetPagedRequests(NebulanceQuery parameters, int? results, int? offset)
|
||||
{
|
||||
var apiUrl = Settings.BaseUrl + "api.php";
|
||||
|
|
@ -85,16 +81,12 @@ private IEnumerable<IndexerRequest> GetPagedRequests(NebulanceQuery parameters,
|
|||
|
||||
public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria)
|
||||
{
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
return pageableRequests;
|
||||
return new IndexerPageableRequestChain();
|
||||
}
|
||||
|
||||
public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
|
||||
{
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
return pageableRequests;
|
||||
return new IndexerPageableRequestChain();
|
||||
}
|
||||
|
||||
public IndexerPageableRequestChain GetSearchRequests(TvSearchCriteria searchCriteria)
|
||||
|
|
@ -137,9 +129,7 @@ public IndexerPageableRequestChain GetSearchRequests(TvSearchCriteria searchCrit
|
|||
|
||||
public IndexerPageableRequestChain GetSearchRequests(BookSearchCriteria searchCriteria)
|
||||
{
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
return pageableRequests;
|
||||
return new IndexerPageableRequestChain();
|
||||
}
|
||||
|
||||
public IndexerPageableRequestChain GetSearchRequests(BasicSearchCriteria searchCriteria)
|
||||
|
|
@ -168,19 +158,17 @@ public IndexerPageableRequestChain GetSearchRequests(BasicSearchCriteria searchC
|
|||
public class NebulanceParser : IParseIndexerResponse
|
||||
{
|
||||
private readonly NebulanceSettings _settings;
|
||||
private readonly IndexerCapabilitiesCategories _categories;
|
||||
|
||||
public NebulanceParser(NebulanceSettings settings, IndexerCapabilitiesCategories categories)
|
||||
public NebulanceParser(NebulanceSettings settings)
|
||||
{
|
||||
_settings = settings;
|
||||
_categories = categories;
|
||||
}
|
||||
|
||||
public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
||||
{
|
||||
var torrentInfos = new List<ReleaseInfo>();
|
||||
|
||||
JsonRpcResponse<NebulanceTorrents> jsonResponse = new HttpResponse<JsonRpcResponse<NebulanceTorrents>>(indexerResponse.HttpResponse).Resource;
|
||||
var jsonResponse = new HttpResponse<JsonRpcResponse<NebulanceTorrents>>(indexerResponse.HttpResponse).Resource;
|
||||
|
||||
if (jsonResponse.Error != null || jsonResponse.Result == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue