mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
Adds Anime-specific searching and Fanzub support
Splits searching in the same way as a Daily search, each indexer has a method to search specifically for anime. Fanzub support was also added, with its own indexer and parser classes.
This commit is contained in:
committed by
Mark McDowall
parent
a75ce9ab87
commit
828dd5f5ad
@@ -70,6 +70,10 @@ namespace NzbDrone.Core.IndexerSearch
|
||||
|
||||
return SearchDaily(series, episode);
|
||||
}
|
||||
if (series.SeriesType == SeriesTypes.Anime)
|
||||
{
|
||||
return SearchAnime(series, episode);
|
||||
}
|
||||
|
||||
if (episode.SeasonNumber == 0)
|
||||
{
|
||||
@@ -116,6 +120,17 @@ namespace NzbDrone.Core.IndexerSearch
|
||||
return Dispatch(indexer => _feedFetcher.Fetch(indexer, searchSpec), searchSpec);
|
||||
}
|
||||
|
||||
private List<DownloadDecision> SearchAnime(Series series, Episode episode)
|
||||
{
|
||||
var searchSpec = Get<AnimeEpisodeSearchCriteria>(series, new List<Episode> { episode });
|
||||
// TODO: Get the scene title from TheXEM
|
||||
searchSpec.SceneTitle = series.Title;
|
||||
// TODO: Calculate the Absolute Episode Number on the fly (if I have to)
|
||||
searchSpec.AbsoluteEpisodeNumber = episode.AbsoluteEpisodeNumber.GetValueOrDefault(0);
|
||||
|
||||
return Dispatch(indexer => _feedFetcher.Fetch(indexer, searchSpec), searchSpec);
|
||||
}
|
||||
|
||||
private List<DownloadDecision> SearchSpecial(Series series, List<Episode> episodes)
|
||||
{
|
||||
var searchSpec = Get<SpecialEpisodeSearchCriteria>(series, episodes);
|
||||
|
||||
Reference in New Issue
Block a user