Ejemplo n.º 1
0
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedSearchTerm), searchCriteria));
            return(pageableRequests);
        }
Ejemplo n.º 2
0
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            pageableRequests.Add(GetRequest(string.Format("&artistname={0}&groupname={1}", searchCriteria.Artist, searchCriteria.Album)));

            return(pageableRequests);
        }
Ejemplo n.º 3
0
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var parameters = GetBasicSearchParameters(searchCriteria.SanitizedSearchTerm, searchCriteria.Categories);

            var pageableRequests = new IndexerPageableRequestChain();

            pageableRequests.Add(GetRequest(parameters));
            return(pageableRequests);
        }
Ejemplo n.º 4
0
        public override Task <IndexerPageableQueryResult> Fetch(MusicSearchCriteria searchCriteria)
        {
            if (!SupportsSearch)
            {
                return(Task.FromResult(new IndexerPageableQueryResult()));
            }

            return(FetchReleases(g => SetCookieFunctions(g).GetSearchRequests(searchCriteria)));
        }
Ejemplo n.º 5
0
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            if (searchCriteria.SearchTerm.IsNotNullOrWhiteSpace())
            {
                var titleYearSearchQuery = string.Format("{0}", searchCriteria.SanitizedSearchTerm);
                pageableRequests.Add(GetRequest("search-torrents", searchCriteria.Categories, string.Format("&type=name&query={0}", titleYearSearchQuery.Trim())));
            }
            else
            {
                pageableRequests.Add(GetRequest("latest-torrents", searchCriteria.Categories, ""));
            }

            return(pageableRequests);
        }
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            _logger.Trace("Getting Music search");

            var pageableRequests = new IndexerPageableRequestChain();

            var variables = GetQueryVariableDefaults(searchCriteria);

            variables[".Query.Album"]  = searchCriteria.Album;
            variables[".Query.Artist"] = searchCriteria.Artist;
            variables[".Query.Label"]  = searchCriteria.Label;
            variables[".Query.Track"]  = null;

            pageableRequests.Add(GetRequest(variables));

            return(pageableRequests);
        }
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var capabilities = _capabilitiesProvider.GetCapabilities(Settings, Definition);

            var pageableRequests = new IndexerPageableRequestChain();
            var parameters       = new NameValueCollection();

            if (searchCriteria.Artist.IsNotNullOrWhiteSpace() && capabilities.MusicSearchArtistAvailable)
            {
                parameters.Add("artist", searchCriteria.Artist);
            }

            if (searchCriteria.Album.IsNotNullOrWhiteSpace() && capabilities.MusicSearchAlbumAvailable)
            {
                parameters.Add("album", searchCriteria.Album);
            }

            //Workaround issue with Sphinx search returning garbage results on some indexers. If we don't use id parameters, fallback to t=search
            if (parameters.Count == 0)
            {
                searchCriteria.SearchType = "search";

                if (searchCriteria.SearchTerm.IsNotNullOrWhiteSpace() && capabilities.SearchAvailable)
                {
                    parameters.Add("q", NewsnabifyTitle(searchCriteria.SearchTerm));
                }
            }
            else
            {
                if (searchCriteria.SearchTerm.IsNotNullOrWhiteSpace() && capabilities.MusicSearchAvailable)
                {
                    parameters.Add("q", NewsnabifyTitle(searchCriteria.SearchTerm));
                }
            }

            pageableRequests.Add(GetPagedRequests(searchCriteria,
                                                  parameters));

            return(pageableRequests);
        }
Ejemplo n.º 8
0
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var parameters = GetBasicSearchParameters(searchCriteria.SearchTerm, searchCriteria.Categories);

            if (searchCriteria.Artist != null)
            {
                parameters += string.Format("&artistname={0}", searchCriteria.Artist);
            }

            if (searchCriteria.Label != null)
            {
                parameters += string.Format("&recordlabel={0}", searchCriteria.Label);
            }

            if (searchCriteria.Album != null)
            {
                parameters += string.Format("&groupname={0}", searchCriteria.Album);
            }

            var pageableRequests = new IndexerPageableRequestChain();

            pageableRequests.Add(GetRequest(parameters));
            return(pageableRequests);
        }
Ejemplo n.º 9
0
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var pageableRequests = new IndexerPageableRequestChain();

            return(pageableRequests);
        }
 public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
 {
     return(new IndexerPageableRequestChain());
 }
Ejemplo n.º 11
0
        public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
        {
            var request = GetRequest(searchCriteria.SanitizedSearchTerm, searchCriteria.Categories);

            return(GetRequestChain(request, 2));
        }
Ejemplo n.º 12
0
 public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
 => GetRequestWithSearchType(searchCriteria, "music");
Ejemplo n.º 13
0
 public abstract Task<IndexerPageableQueryResult> Fetch(MusicSearchCriteria searchCriteria);
Ejemplo n.º 14
0
 public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
 => PerformRequest(searchCriteria);
Ejemplo n.º 15
0
 public IndexerPageableRequestChain GetSearchRequests(MusicSearchCriteria searchCriteria)
 {
     return(GetSearchRequestsCommon(searchCriteria, string.Format("{0}", searchCriteria.SanitizedSearchTerm)));
 }