public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var searchTitles = searchCriteria.QueryTitles.SelectMany(v => GetTitleSearchStrings(v, searchCriteria.AbsoluteEpisodeNumber)).ToList(); pageableRequests.Add(GetPagedRequests(string.Join("|", searchTitles))); return pageableRequests; }
public void SetUp() { UseRealHttp(); _singleSearchCriteria = new SingleEpisodeSearchCriteria() { SceneTitles = new List<string> { "Person of Interest" }, SeasonNumber = 1, EpisodeNumber = 1 }; _animeSearchCriteria = new AnimeEpisodeSearchCriteria() { SceneTitles = new List<string> { "Steins;Gate" }, AbsoluteEpisodeNumber = 1 }; }
public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var queryBase = new TorrentQuery(); if (TryAddSearchParameters(queryBase, searchCriteria)) { foreach (var episode in searchCriteria.Episodes) { var query = queryBase.Clone(); query.TvdbInfo.Season = episode.SeasonNumber; query.TvdbInfo.Episode = episode.EpisodeNumber; } } return pageableRequests; }
public IList<IEnumerable<IndexerRequest>> GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var requests = new List<IEnumerable<IndexerRequest>>(); var queryBase = new TorrentQuery(); if (TryAddSearchParameters(queryBase, searchCriteria)) { foreach (var episode in searchCriteria.Episodes) { var query = queryBase.Clone(); query.TvdbInfo.Season = episode.SeasonNumber; query.TvdbInfo.Episode = episode.EpisodeNumber; } } return requests; }
public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { var searchTitle = PrepareQuery(queryTitle); pageableRequests.Add(GetPagedRequests(MaxPages, $"{searchTitle}+{searchCriteria.AbsoluteEpisodeNumber:0}")); if (searchCriteria.AbsoluteEpisodeNumber < 10) { pageableRequests.Add(GetPagedRequests(MaxPages, $"{searchTitle}+{searchCriteria.AbsoluteEpisodeNumber:00}")); } } return pageableRequests; }
public virtual IList<IEnumerable<IndexerRequest>> GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequests = new List<IEnumerable<IndexerRequest>>(); foreach (var queryTitle in searchCriteria.QueryTitles) { var searchTitle = PrepareQuery(queryTitle); pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, String.Format("&term={0}+{1:0}", searchTitle, searchCriteria.AbsoluteEpisodeNumber))); if (searchCriteria.AbsoluteEpisodeNumber < 10) { pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, String.Format("&term={0}+{1:00}", searchTitle, searchCriteria.AbsoluteEpisodeNumber))); } } return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { return new IndexerPageableRequestChain(); }
public virtual IList<IEnumerable<IndexerRequest>> GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { return new List<IEnumerable<IndexerRequest>>(); }
public virtual IList<IEnumerable<IndexerRequest>> GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequests = new List<IEnumerable<IndexerRequest>>(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.AnimeCategories, "search", String.Format("&q={0}+{1:00}", NewsnabifyTitle(queryTitle), searchCriteria.AbsoluteEpisodeNumber))); } return pageableRequests; }
public IList<ReleaseInfo> Fetch(IIndexer indexer, AnimeEpisodeSearchCriteria searchCriteria) { _logger.Debug("Searching for {0}", searchCriteria); var searchUrls = indexer.GetAnimeEpisodeSearchUrls(searchCriteria.SceneTitles, searchCriteria.Series.TvRageId, searchCriteria.AbsoluteEpisodeNumber); var result = Fetch(indexer, searchUrls); _logger.Info("Finished searching {0} for {1}. Found {2}", indexer, searchCriteria, result.Count); return result; }
public virtual IList<IEnumerable<IndexerRequest>> GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequest = new List<IEnumerable<IndexerRequest>>(); var parameters = new BroadcastheNetTorrentQuery(); if (AddSeriesSearchParameters(parameters, searchCriteria)) { foreach (var episode in searchCriteria.Episodes) { parameters = parameters.Clone(); parameters.Category = "Episode"; parameters.Name = String.Format("S{0:00}E{1:00}", episode.SeasonNumber, episode.EpisodeNumber); pageableRequest.AddIfNotNull(GetPagedRequests(MaxPages, parameters)); } foreach (var seasonNumber in searchCriteria.Episodes.Select(v => v.SeasonNumber).Distinct()) { parameters = parameters.Clone(); parameters.Category = "Season"; parameters.Name = String.Format("Season {0}", seasonNumber); pageableRequest.AddIfNotNull(GetPagedRequests(MaxPages, parameters)); } } return pageableRequest; }
public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); if (SupportsSearch) { foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, Settings.AnimeCategories, "search", string.Format("&q={0}+{1:00}", NewsnabifyTitle(queryTitle), searchCriteria.AbsoluteEpisodeNumber))); } } return pageableRequests; }