mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 13:57:11 -04:00
parent
5d14d2c134
commit
d5abde98e1
2 changed files with 25 additions and 8 deletions
|
@ -8,6 +8,7 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
|||
{
|
||||
public string Url { get; set; }
|
||||
public string Download { get; set; }
|
||||
public string Category { get; set; }
|
||||
|
||||
[JsonProperty(PropertyName = "movie_tv")]
|
||||
public AvistazIdInfo MovieTvinfo { get; set; }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Indexers.Definitions.Avistaz;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
@ -30,15 +30,14 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
};
|
||||
}
|
||||
|
||||
public override IParseIndexerResponse GetParser()
|
||||
{
|
||||
return new ExoticaZParser(Capabilities.Categories);
|
||||
}
|
||||
|
||||
protected override IndexerCapabilities SetCapabilities()
|
||||
{
|
||||
var caps = new IndexerCapabilities
|
||||
{
|
||||
MovieSearchParams = new List<MovieSearchParam>
|
||||
{
|
||||
MovieSearchParam.Q
|
||||
}
|
||||
};
|
||||
var caps = new IndexerCapabilities();
|
||||
|
||||
caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.XXXx264, "Video Clip");
|
||||
caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.XXXPack, "Video Pack");
|
||||
|
@ -52,4 +51,21 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
return caps;
|
||||
}
|
||||
}
|
||||
|
||||
public class ExoticaZParser : AvistazParser
|
||||
{
|
||||
private readonly IndexerCapabilitiesCategories _categories;
|
||||
|
||||
public ExoticaZParser(IndexerCapabilitiesCategories categories)
|
||||
{
|
||||
_categories = categories;
|
||||
}
|
||||
|
||||
protected override List<IndexerCategory> ParseCategories(AvistazRelease row)
|
||||
{
|
||||
var cat = row.Category;
|
||||
|
||||
return _categories.MapTrackerCatToNewznab(cat).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue