public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var parameters = new BroadcastheNetTorrentQuery(); if (AddSeriesSearchParameters(parameters, searchCriteria)) { var episodeQueryTitle = searchCriteria.Episodes.Where(e => !string.IsNullOrWhiteSpace(e.Title)) .Select(e => SearchCriteriaBase.GetQueryTitle(e.Title)) .ToArray(); foreach (var queryTitle in episodeQueryTitle) { parameters = parameters.Clone(); parameters.Category = "Episode"; parameters.Name = "%" + queryTitle + "%"; pageableRequests.Add(GetPagedRequests(MaxPages, parameters)); } } return(pageableRequests); }
public override IList <ReleaseInfo> Fetch(SpecialEpisodeSearchCriteria searchCriteria) { if (!SupportsSearch) { return(new List <ReleaseInfo>()); } return(FetchReleases(g => g.GetSearchRequests(searchCriteria))); }
public override IList <ReleaseInfo> Fetch(SpecialEpisodeSearchCriteria searchCriteria) { if (!SupportsSearch) { return(new List <ReleaseInfo>()); } var generator = GetRequestGenerator(); return(FetchReleases(generator.GetSearchRequests(searchCriteria))); }
public virtual IList <IEnumerable <IndexerRequest> > GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new List <IEnumerable <IndexerRequest> >(); foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), "category:tv")); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), "category:tv")); } return(pageableRequests); }
public virtual IList <IEnumerable <IndexerRequest> > GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new List <IEnumerable <IndexerRequest> >(); foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, String.Format("&term={0}", PrepareQuery(queryTitle)))); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, string.Format("&term={0}", PrepareQuery(queryTitle)))); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { var query = queryTitle.Replace('+', ' '); query = System.Web.HttpUtility.UrlEncode(query); pageableRequests.Add(GetPagedRequests(query)); } return(pageableRequests); }
public virtual IList <IEnumerable <IndexerRequest> > GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new List <IEnumerable <IndexerRequest> >(); foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { var query = queryTitle.Replace('+', ' '); query = System.Web.HttpUtility.UrlEncode(query); pageableRequests.AddIfNotNull(GetPagedRequests(query)); } return(pageableRequests); }
public IList <ReleaseInfo> Fetch(IIndexer indexer, SpecialEpisodeSearchCriteria searchCriteria) { var queryUrls = new List <String>(); foreach (var episodeQueryTitle in searchCriteria.EpisodeQueryTitles) { _logger.Debug("Performing query of {0} for {1}", indexer, episodeQueryTitle); queryUrls.AddRange(indexer.GetSearchUrls(episodeQueryTitle)); } var result = Fetch(indexer, queryUrls); _logger.Info("Finished searching {0} for {1}. Found {2}", indexer, searchCriteria, result.Count); return(result); }
public virtual IList <IEnumerable <IndexerRequest> > GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new List <IEnumerable <IndexerRequest> >(); foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { var query = queryTitle.Replace('+', ' '); query = System.Web.HttpUtility.UrlEncode(query); pageableRequests.AddIfNotNull(GetPagedRequests(MaxPages, Settings.Categories.Concat(Settings.AnimeCategories), "search", String.Format("&q={0}", query))); } return(pageableRequests); }
public IList <ReleaseInfo> Fetch(IIndexer indexer, SpecialEpisodeSearchCriteria searchCriteria) { var searchUrls = new List <String>(); foreach (var episodeQueryTitle in searchCriteria.EpisodeQueryTitles) { var urls = indexer.GetSearchUrls(episodeQueryTitle).ToList(); if (urls.Any()) { _logger.Debug("Performing query of {0} for {1}", indexer, episodeQueryTitle); searchUrls.AddRange(urls); } } return(Fetch(indexer, searchUrls, searchCriteria)); }
public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); if (SupportsSearch) { foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) { var query = queryTitle.Replace('+', ' '); query = System.Web.HttpUtility.UrlEncode(query); pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories.Concat(Settings.AnimeCategories), "search", string.Format("&q={0}", query))); } } return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { throw new NotImplementedException(); }
public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { return(new IndexerPageableRequestChain()); }
public abstract IList <ReleaseInfo> Fetch(SpecialEpisodeSearchCriteria searchCriteria);
public virtual IList <IEnumerable <IndexerRequest> > GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { return(new List <IEnumerable <IndexerRequest> >()); }