Пример #1
0
        public virtual IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
        {
            if (!SupportsTvdbSearch && !SupportsTvSearch && !SupportsTvTitleSearch)
            {
                _logger.Debug("Indexer capabilities lacking season & ep query parameters, no Daily series search possible.");
            }

            var pageableRequests = new IndexerPageableRequestChain();

            if (searchCriteria.SearchMode.HasFlag(SearchMode.SearchID) || searchCriteria.SearchMode == SearchMode.Default)
            {
                AddTvIdPageableRequests(pageableRequests, Settings.Categories, searchCriteria,
                                        string.Format("&season={0}",
                                                      searchCriteria.Year));
            }

            if (searchCriteria.SearchMode.HasFlag(SearchMode.SearchTitle))
            {
                AddTitlePageableRequests(pageableRequests, Settings.Categories, searchCriteria,
                                         string.Format("&season={0}",
                                                       searchCriteria.Year));
            }

            pageableRequests.AddTier();

            if (searchCriteria.SearchMode == SearchMode.Default)
            {
                AddTitlePageableRequests(pageableRequests, Settings.Categories, searchCriteria,
                                         string.Format("&season={0}",
                                                       searchCriteria.Year));
            }

            return(pageableRequests);
        }
        public virtual IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            var parameters = new BroadcastheNetTorrentQuery();

            if (AddSeriesSearchParameters(parameters, searchCriteria))
            {
                parameters.Category = "Episode";
                parameters.Name     = string.Format("{0}%", searchCriteria.Year);

                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(DailySeasonSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            if (searchCriteria.SearchMode.HasFlag(SearchMode.SearchID) || searchCriteria.SearchMode == SearchMode.Default)
            {
                AddTvIdPageableRequests(pageableRequests, Settings.Categories, searchCriteria,
                                        string.Format("&season={0}",
                                                      searchCriteria.Year));
            }

            if (searchCriteria.SearchMode.HasFlag(SearchMode.SearchTitle))
            {
                AddTitlePageableRequests(pageableRequests, Settings.Categories, searchCriteria,
                                         string.Format("&season={0}",
                                                       searchCriteria.Year));
            }

            pageableRequests.AddTier();

            if (searchCriteria.SearchMode == SearchMode.Default)
            {
                AddTitlePageableRequests(pageableRequests, Settings.Categories, searchCriteria,
                                         string.Format("&season={0}",
                                                       searchCriteria.Year));
            }

            return(pageableRequests);
        }
Пример #4
0
        public virtual IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            pageableRequests.Add(GetPagedRequests("search", searchCriteria.Series.TvdbId, "\"{0}\"", searchCriteria.Year));

            return(pageableRequests);
        }
Пример #5
0
        public override IList <ReleaseInfo> Fetch(DailySeasonSearchCriteria searchCriteria)
        {
            if (!SupportsSearch)
            {
                return(new List <ReleaseInfo>());
            }

            return(FetchReleases(g => g.GetSearchRequests(searchCriteria)));
        }
Пример #6
0
        public virtual IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            AddTvIdPageableRequests(pageableRequests, Settings.Categories, searchCriteria,
                                    string.Format("&season={0}",
                                                  searchCriteria.Year));

            return(pageableRequests);
        }
Пример #7
0
        public virtual IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            foreach (var queryTitle in searchCriteria.QueryTitles)
            {
                pageableRequests.Add(GetPagedRequests(string.Format("{0}+{1}",
                                                                    queryTitle,
                                                                    searchCriteria.Year)));
            }

            return(pageableRequests);
        }
Пример #8
0
        public virtual IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            var query = new TorrentQuery();

            if (TryAddSearchParameters(query, searchCriteria))
            {
                query.Search = string.Format("{0}-", searchCriteria.Year);

                pageableRequests.Add(GetRequest(query));
            }

            return(pageableRequests);
        }
Пример #9
0
 public abstract IList <ReleaseInfo> Fetch(DailySeasonSearchCriteria searchCriteria);
 public IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
 {
     return(new IndexerPageableRequestChain());
 }
Пример #11
0
 public IndexerPageableRequestChain GetSearchRequests(DailySeasonSearchCriteria searchCriteria)
 {
     throw new NotImplementedException();
 }