mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-08 21:14:30 +02:00
Fixed: (SubsPlease) Update category mappings for movie releases
Co-authored-by: Lemres <45440100+Calemy@users.noreply.github.com> Fixes #1866
This commit is contained in:
parent
86cec51ebe
commit
0b0d6b7590
1 changed files with 15 additions and 5 deletions
|
|
@ -43,7 +43,7 @@ public SubsPlease(IIndexerHttpClient httpClient, IEventAggregator eventAggregato
|
|||
|
||||
public override IIndexerRequestGenerator GetRequestGenerator()
|
||||
{
|
||||
return new SubsPleaseRequestGenerator() { Settings = Settings, Capabilities = Capabilities };
|
||||
return new SubsPleaseRequestGenerator { Settings = Settings, Capabilities = Capabilities };
|
||||
}
|
||||
|
||||
public override IParseIndexerResponse GetParser()
|
||||
|
|
@ -56,12 +56,17 @@ private IndexerCapabilities SetCapabilities()
|
|||
var caps = new IndexerCapabilities
|
||||
{
|
||||
TvSearchParams = new List<TvSearchParam>
|
||||
{
|
||||
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep
|
||||
},
|
||||
{
|
||||
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep
|
||||
},
|
||||
MovieSearchParams = new List<MovieSearchParam>
|
||||
{
|
||||
MovieSearchParam.Q
|
||||
}
|
||||
};
|
||||
|
||||
caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime, "Anime");
|
||||
caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.TVAnime);
|
||||
caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.MoviesOther);
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
|
@ -205,6 +210,11 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
UploadVolumeFactor = 1
|
||||
};
|
||||
|
||||
if (value.Episode.ToLowerInvariant() == "movie")
|
||||
{
|
||||
release.Categories.Add(NewznabStandardCategory.MoviesOther);
|
||||
}
|
||||
|
||||
// Ex: [SubsPlease] Shingeki no Kyojin (The Final Season) - 64 (1080p)
|
||||
release.Title += $"[SubsPlease] {value.Show} - {value.Episode} ({d.Res}p)";
|
||||
release.MagnetUrl = d.Magnet;
|
||||
|
|
|
|||
Loading…
Reference in a new issue