mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
@@ -30,7 +30,7 @@ namespace NzbDrone.Core.Indexers.HDBits
|
|||||||
|
|
||||||
public override IParseIndexerResponse GetParser()
|
public override IParseIndexerResponse GetParser()
|
||||||
{
|
{
|
||||||
return new HDBitsParser(Settings);
|
return new HDBitsParser(Settings, Capabilities.Categories);
|
||||||
}
|
}
|
||||||
|
|
||||||
private IndexerCapabilities SetCapabilities()
|
private IndexerCapabilities SetCapabilities()
|
||||||
|
@@ -12,10 +12,12 @@ namespace NzbDrone.Core.Indexers.HDBits
|
|||||||
public class HDBitsParser : IParseIndexerResponse
|
public class HDBitsParser : IParseIndexerResponse
|
||||||
{
|
{
|
||||||
private readonly HDBitsSettings _settings;
|
private readonly HDBitsSettings _settings;
|
||||||
|
private readonly IndexerCapabilitiesCategories _categories;
|
||||||
|
|
||||||
public HDBitsParser(HDBitsSettings settings)
|
public HDBitsParser(HDBitsSettings settings, IndexerCapabilitiesCategories categories)
|
||||||
{
|
{
|
||||||
_settings = settings;
|
_settings = settings;
|
||||||
|
_categories = categories;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
||||||
@@ -65,6 +67,7 @@ namespace NzbDrone.Core.Indexers.HDBits
|
|||||||
Guid = string.Format("HDBits-{0}", id),
|
Guid = string.Format("HDBits-{0}", id),
|
||||||
Title = result.Name,
|
Title = result.Name,
|
||||||
Size = result.Size,
|
Size = result.Size,
|
||||||
|
Categories = _categories.MapTrackerCatToNewznab(result.TypeCategory.ToString()),
|
||||||
InfoHash = result.Hash,
|
InfoHash = result.Hash,
|
||||||
DownloadUrl = GetDownloadUrl(id),
|
DownloadUrl = GetDownloadUrl(id),
|
||||||
InfoUrl = GetInfoUrl(id),
|
InfoUrl = GetInfoUrl(id),
|
||||||
|
Reference in New Issue
Block a user