public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var parameters = new BroadcastheNetTorrentQuery(); if (AddSeriesSearchParameters(parameters, searchCriteria)) { foreach (var seasonNumber in searchCriteria.Episodes.Select(v => v.SeasonNumber).Distinct()) { parameters.Category = "Season"; parameters.Name = string.Format("Season {0}", seasonNumber); pageableRequests.Add(GetPagedRequests(MaxPages, parameters)); parameters = parameters.Clone(); parameters.Category = "Episode"; parameters.Name = string.Format("S{0:00}E%", seasonNumber); pageableRequests.Add(GetPagedRequests(MaxPages, parameters)); } } return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(SingleEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(MaxPages, series_id: searchCriteria.Series.TvdbId, episode: string.Format("S{0:00}E{1:00}", searchCriteria.SeasonNumber, searchCriteria.EpisodeNumber))); pageableRequests.Add(GetPagedRequests(MaxPages, series_id: searchCriteria.Series.TvdbId, season: string.Format("Season {0:00}", searchCriteria.SeasonNumber))); return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests("search", searchCriteria.Series.TvdbId, "S{0:00}", searchCriteria.SeasonNumber)); return pageableRequests; }
public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(MaxPages, "tv")); return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests("search", searchCriteria.Series.TvdbId, "\"{0:yyyy MM dd}\"", searchCriteria.AirDate)); return pageableRequests; }
public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetRssRequests()); return pageableRequests; }
public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests("list", null, null)); return pageableRequests; }
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 IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.Movie.Title))); return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(BasicSearchCriteria searchCriteria) { var parameters = GetBasicSearchParameters(searchCriteria.SearchTerm, searchCriteria.Categories); var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetRequest(parameters)); return(pageableRequests); }
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 IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), "category:tv", string.Format("season:{0}", searchCriteria.SeasonNumber))); pageableRequests.Add(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), "category:tv", string.Format("S{0:00}", searchCriteria.SeasonNumber))); } return(pageableRequests); }
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 virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), "category:tv", string.Format("season:{0}", searchCriteria.SeasonNumber))); pageableRequests.Add(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), "category:tv", string.Format("S{0:00}", searchCriteria.SeasonNumber))); } return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(MaxPages, series_id: searchCriteria.Series.TvdbId, air_date: searchCriteria.AirDate)); return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); if (searchCriteria.Movie.ImdbId.IsNotNullOrWhiteSpace()) { pageableRequests.Add(GetRequest("search-torrents", string.Format("&type=imdb&query={0}", searchCriteria.Movie.ImdbId))); } else { foreach (var queryTitle in searchCriteria.QueryTitles) { var titleYearSearchQuery = string.Format("{0}+{1}", queryTitle, searchCriteria.Movie.Year); pageableRequests.Add(GetRequest("search-torrents", string.Format("&type=name&query={0}", titleYearSearchQuery.Trim()))); } } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(AlbumSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(string.Format("{0}+{1}", searchCriteria.ArtistQuery, searchCriteria.AlbumQuery))); return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var searchTitles = searchCriteria.CleanSceneTitles.SelectMany(v => GetTitleSearchStrings(v, searchCriteria.AbsoluteEpisodeNumber)).ToList(); pageableRequests.Add(GetPagedRequests(string.Join("|", searchTitles))); return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(MaxPages, series_id: searchCriteria.Series.TvdbId, air_date: searchCriteria.AirDate)); return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(BasicSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(searchCriteria.RssSearch ? GetRssRequest() : GetSearchRequests(searchCriteria.SanitizedSearchTerm)); return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(TvSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var parameters = new BroadcastheNetTorrentQuery(); var searchString = searchCriteria.SearchTerm != null ? searchCriteria.SearchTerm : ""; var btnResults = searchCriteria.Limit.GetValueOrDefault(); if (btnResults == 0) { btnResults = (int)Capabilities.LimitsDefault; } var btnOffset = searchCriteria.Offset.GetValueOrDefault(); if (searchCriteria.TvdbId > 0) { parameters.Tvdb = string.Format("{0}", searchCriteria.TvdbId); } if (searchCriteria.RId > 0) { parameters.Tvrage = string.Format("{0}", searchCriteria.RId); } // If only the season/episode is searched for then change format to match expected format if (searchCriteria.Season > 0 && searchCriteria.Episode.IsNullOrWhiteSpace()) { // Season Only parameters.Name = string.Format("Season {0}%", searchCriteria.Season.Value); parameters.Category = "Season"; } else if (searchCriteria.Season > 0 && Regex.IsMatch(searchCriteria.EpisodeSearchString, "(\\d{4}\\.\\d{2}\\.\\d{2})")) { // Daily Episode parameters.Name = searchCriteria.EpisodeSearchString; parameters.Category = "Episode"; } else if (searchCriteria.Season > 0 && int.Parse(searchCriteria.Episode) > 0) { // Standard (S/E) Episode parameters.Name = string.Format("S{0:00}E{1:00}", searchCriteria.Season.Value, int.Parse(searchCriteria.Episode)); parameters.Category = "Episode"; } // Neither a season only search nor daily nor standard, fall back to query parameters.Search = searchString.Replace(" ", "%"); pageableRequests.Add(GetPagedRequests(parameters, btnResults, btnOffset)); return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, PrepareQuery(string.Format("{0} {1}", queryTitle, searchCriteria.Movie.Year)))); } return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(TvSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); if (searchCriteria.ImdbId.IsNotNullOrWhiteSpace()) { pageableRequests.Add(GetRequest("search-torrents", searchCriteria.Categories, string.Format("&type=imdb&query={0}&season={1}&episode={2}", searchCriteria.FullImdbId, searchCriteria.Season, searchCriteria.Episode))); } else if (searchCriteria.SearchTerm.IsNotNullOrWhiteSpace()) { var titleYearSearchQuery = string.Format("{0}", searchCriteria.SanitizedSearchTerm); pageableRequests.Add(GetRequest("search-torrents", searchCriteria.Categories, string.Format("&type=name&query={0}&season={1}&episode={2}", titleYearSearchQuery.Trim(), searchCriteria.Season, searchCriteria.Episode))); } else { pageableRequests.Add(GetRequest("latest-torrents", searchCriteria.Categories, "")); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(ArtistSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.AddTier(); pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories, "search", NewsnabifyTitle($"&q={searchCriteria.ArtistQuery}"))); return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria) { var parameters = GetBasicSearchParameters(searchCriteria.Categories); parameters.Add("search", GetSearchTerm(searchCriteria.SanitizedSearchTerm).Trim()); var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetRequest(parameters)); return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); if (Settings.AnimeStandardFormatSearch && searchCriteria.SeasonNumber > 0) { var searchTitles = searchCriteria.CleanSceneTitles.SelectMany(v => GetSeasonSearchStrings(v, searchCriteria.SeasonNumber)).ToList(); pageableRequests.Add(GetPagedRequests(string.Join("|", searchTitles))); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var query = new TorrentQuery(); if (TryAddSearchParameters(query, searchCriteria)) { pageableRequests.Add(GetRequest(query)); } return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.CleanSceneTitles) { pageableRequests.Add(GetPagedRequests(string.Format("{0}", queryTitle))); } return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); if (searchCriteria?.SceneTitles != null) { searchCriteria.SceneTitles.ForEach(sceneTitle => pageableRequests.Add(GetRequest(FileNameBuilder.CleanFileName(sceneTitle)))); } return(pageableRequests); }
public IndexerPageableRequestChain GetSearchRequests(BasicSearchCriteria searchCriteria) { _logger.Trace("Getting Basic search"); var pageableRequests = new IndexerPageableRequestChain(); var variables = GetQueryVariableDefaults(searchCriteria); pageableRequests.Add(GetRequest(variables)); 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 IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); var capabilities = _capabilitiesProvider.GetCapabilities(Settings); if (capabilities.SupportedTvSearchParameters != null) { pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories.Concat(Settings.AnimeCategories), "tvsearch", "")); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(string.Format("{0}+{1:yyyy MM dd}", queryTitle, searchCriteria.AirDate))); } 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(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(string.Format("{0}+S{1:00}", queryTitle, searchCriteria.SeasonNumber))); } 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(DailySeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.CleanSceneTitles) { pageableRequests.Add(GetPagedRequests(string.Format("{0}+{1}", queryTitle, searchCriteria.Year))); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(string.Format("{0}+S{1:00}", queryTitle, searchCriteria.SeasonNumber))); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(string.Format("{0}+{1:yyyy MM dd}", queryTitle, searchCriteria.AirDate))); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); var url = $"{Settings.BaseUrl.TrimEnd('/')}/api/newReleases"; pageableRequests.Add(new[] { new IndexerRequest(url, HttpAccept.Json) }); return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var query = new TorrentQuery(); if (TryAddSearchParameters(query, searchCriteria)) { query.Search = string.Format("{0:yyyy}-{0:MM}-{0:dd}", searchCriteria.AirDate); pageableRequests.Add(GetRequest(query)); } 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; }
private IndexerPageableRequestChain GetRequestWithSearchType(SearchCriteriaBase searchCriteria, string searchType) { var pageableRequests = new IndexerPageableRequestChain(); // TODO: Remove this once Prowlarr has proper support for non Pageable Indexers and can tell Sonarr that indexer doesn't support pagination in a proper way, for now just return empty release list on all request containing an offset if (searchCriteria.Offset is > 0) { return(pageableRequests); } pageableRequests.Add(GetRequest(searchType, searchCriteria.SanitizedSearchTerm, searchCriteria.Categories)); return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(MaxPages, series_id: searchCriteria.Series.TvdbId, season: string.Format("Season {0:00}", searchCriteria.SeasonNumber))); pageableRequests.AddTier(); // TODO: Search for all episodes?!? return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), string.Format("{0:yyyy-MM-dd}", searchCriteria.AirDate), "category:tv")); } 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 IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); pageableRequests.Add(GetPagedRequests(MaxPages, series_id: searchCriteria.Series.TvdbId, season: string.Format("Season {0:00}", searchCriteria.SeasonNumber))); pageableRequests.AddTier(); // TODO: Search for all episodes?!? return(pageableRequests); }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); foreach (var queryTitle in searchCriteria.QueryTitles) { pageableRequests.Add(GetPagedRequests(MaxPages, "usearch", PrepareQuery(queryTitle), string.Format("{0:yyyy-MM-dd}", searchCriteria.AirDate), "category:tv")); } return(pageableRequests); }
public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); if (LastRecentTorrentID.HasValue) { pageableRequests.Add(GetPagedRequests(MaxPages, new BroadcastheNetTorrentQuery() { Id = ">=" + (LastRecentTorrentID.Value - 100) })); } pageableRequests.AddTier(GetPagedRequests(MaxPages, new BroadcastheNetTorrentQuery() { Age = "<=86400" })); return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(SeasonSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var queryBase = new TorrentQuery(); if (TryAddSearchParameters(queryBase, searchCriteria)) { foreach (var seasonNumber in searchCriteria.Episodes.Select(e => e.SeasonNumber).Distinct()) { var query = queryBase.Clone(); query.TvdbInfo.Season = seasonNumber; pageableRequests.Add(GetRequest(query)); } } return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var parameters = new BroadcastheNetTorrentQuery(); if (AddSeriesSearchParameters(parameters, searchCriteria)) { parameters.Category = "Episode"; parameters.Name = string.Format("{0:yyyy}.{0:MM}.{0:dd}", searchCriteria.AirDate); pageableRequests.Add(GetPagedRequests(MaxPages, parameters)); } return pageableRequests; }
public virtual IndexerPageableRequestChain GetSearchRequests(DailyEpisodeSearchCriteria searchCriteria) { var pageableRequests = new IndexerPageableRequestChain(); var parameters = new BroadcastheNetTorrentQuery(); if (AddSeriesSearchParameters(parameters, searchCriteria)) { parameters.Category = "Episode"; parameters.Name = string.Format("{0:yyyy}.{0:MM}.{0:dd}", searchCriteria.AirDate); pageableRequests.Add(GetPagedRequests(MaxPages, parameters)); pageableRequests.AddTier(); 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); pageableRequests.Add(GetPagedRequests(MaxPages, parameters)); } } 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 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 virtual IndexerPageableRequestChain GetSearchRequests(SingleEpisodeSearchCriteria 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; pageableRequests.Add(GetRequest(query)); } } return pageableRequests; }
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; }
public virtual IndexerPageableRequestChain GetRecentRequests() { var pageableRequests = new IndexerPageableRequestChain(); var capabilities = _capabilitiesProvider.GetCapabilities(Settings); if (capabilities.SupportedTvSearchParameters != null) { pageableRequests.Add(GetPagedRequests(MaxPages, Settings.Categories.Concat(Settings.AnimeCategories), "tvsearch", "")); } return pageableRequests; }
private void AddTvIdPageableRequests(IndexerPageableRequestChain chain, int maxPages, IEnumerable<int> categories, SearchCriteriaBase searchCriteria, string parameters) { if (SupportsAggregatedIdSearch && (SupportsTvdbSearch || SupportsTvRageSearch || SupportsTvMazeSearch)) { var ids = ""; if (searchCriteria.Series.TvdbId > 0 && SupportsTvdbSearch) { ids += "&tvdbid=" + searchCriteria.Series.TvdbId; } if (searchCriteria.Series.TvRageId > 0 && SupportsTvRageSearch) { ids += "&rid=" + searchCriteria.Series.TvRageId; } if (searchCriteria.Series.TvMazeId > 0 && SupportsTvMazeSearch) { ids += "&tvmazeid=" + searchCriteria.Series.TvMazeId; } chain.Add(GetPagedRequests(maxPages, categories, "tvsearch", ids + parameters)); } else { if (searchCriteria.Series.TvdbId > 0 && SupportsTvdbSearch) { chain.Add(GetPagedRequests(maxPages, categories, "tvsearch", string.Format("&tvdbid={0}{1}", searchCriteria.Series.TvdbId, parameters))); } else if (searchCriteria.Series.TvRageId > 0 && SupportsTvRageSearch) { chain.Add(GetPagedRequests(maxPages, categories, "tvsearch", string.Format("&rid={0}{1}", searchCriteria.Series.TvRageId, parameters))); } else if (searchCriteria.Series.TvMazeId > 0 && SupportsTvMazeSearch) { chain.Add(GetPagedRequests(maxPages, categories, "tvsearch", string.Format("&tvmazeid={0}{1}", searchCriteria.Series.TvMazeId, parameters))); } } if (SupportsTvSearch) { chain.AddTier(); foreach (var queryTitle in searchCriteria.QueryTitles) { chain.Add(GetPagedRequests(MaxPages, Settings.Categories, "tvsearch", string.Format("&q={0}{1}", NewsnabifyTitle(queryTitle), parameters))); } } }