예제 #1
0
 protected AdvancedSearchResult(string keyword, Category category, AdvancedSearchOptions advancedSearch)
     : base(keyword, category)
 {
     _AdvSearchData = advancedSearch is null ? new AdvancedSearchOptions() : advancedSearch.Clone();
     SearchUri      = _AdvSearchData == default
         ? base.SearchUri
         : new Uri(base.SearchUri.OriginalString + getQueryString());
 }
예제 #2
0
 private AdvancedSearchResult(string keyword, Category category, AdvancedSearchOptions advancedSearch)
     : base(keyword, category)
 {
     if (advancedSearch != null)
     {
         this.advSearchData = advancedSearch.Data;
     }
     this.SearchUri = this.advSearchData == default(ushort)
         ? base.SearchUri
         : new Uri(base.SearchUri.OriginalString + getQueryString());
 }
예제 #3
0
        private string getQueryString()
        {
            var adv = new AdvancedSearchOptions(this.advSearchData);

            return($"&advsearch=1" +
                   $"{(adv.SkipMasterTags ? "&skip_mastertags=1" : "")}" +
                   $"{(adv.SearchName ? "&f_sname=1" : "")}" +
                   $"{(adv.SearchTags ? "&f_stags=1" : "")}" +
                   $"{(adv.SearchDescription ? "&f_sdesc=1" : "")}" +
                   $"{(adv.SearchTorrentFilenames ? "&f_storr=1" : "")}" +
                   $"{(adv.GalleriesWithTorrentsOnly ? "&f_sto=1" : "")}" +
                   $"{(adv.SearchLowPowerTags ? "&f_sdt1=1" : "")}" +
                   $"{(adv.SearchDownvotedTags ? "&f_sdt2=1" : "")}" +
                   $"{(adv.ShowExpungedGalleries ? "&f_sh=1" : "")}" +
                   $"{(adv.SearchMinimumRating ? "&f_sr=1&f_srdd=" + adv.MinimumRating.ToString() : "")}");
        }
예제 #4
0
 internal static AdvancedSearchResult Search(string keyword, Category category, AdvancedSearchOptions advancedSearch)
 {
     return(new AdvancedSearchResult(keyword, category, advancedSearch));
 }
예제 #5
0
 private WatchedSearchResult(string keyword, Category category, AdvancedSearchOptions advancedSearch)
     : base(keyword, category, advancedSearch)
 {
     SearchUri = new Uri(SearchBaseUri, base.SearchUri.Query);
 }