예제 #1
0
        public bool Contains(TorznabCategory cat)
        {
            if (this == cat)
            {
                return(true);
            }

            if (SubCategories.Contains(cat))
            {
                return(true);
            }

            return(false);
        }
예제 #2
0
 protected void AddMultiCategoryMapping(TorznabCategory newznabCategory, params int[] trackerCategories)
 {
     foreach (var trackerCat in trackerCategories)
     {
         categoryMapping.Add(new CategoryMapping(trackerCat.ToString(), newznabCategory.ID));
     }
 }
예제 #3
0
 protected void AddCategoryMapping(string trackerCategory, TorznabCategory newznabCategory)
 {
     categoryMapping.Add(new CategoryMapping(trackerCategory.ToString(), newznabCategory.ID));
     if (!TorznabCaps.Categories.Contains(newznabCategory))
         TorznabCaps.Categories.Add(newznabCategory);
 }
예제 #4
0
 protected void AddMultiCategoryMapping(TorznabCategory newznabCategory, params int[] trackerCategories)
 {
     foreach (var trackerCat in trackerCategories)
     {
         AddCategoryMapping(trackerCat, newznabCategory);
     }
 }
예제 #5
0
 protected void AddCategoryMapping(int trackerCategory, TorznabCategory newznabCategory)
 {
     AddCategoryMapping(trackerCategory.ToString(), newznabCategory);
 }
예제 #6
0
파일: Rarbg.cs 프로젝트: WarlaxZ/Jackett
 void AddCat(int cat, TorznabCategory catType, string label)
 {
     AddCategoryMapping(cat, catType);
     categoryLabels.Add(label, cat);
 }
예제 #7
0
 protected void AddCategoryMapping(int trackerCategory, TorznabCategory newznabCategory, string trackerCategoryDesc = null)
 {
     AddCategoryMapping(trackerCategory.ToString(), newznabCategory, trackerCategoryDesc);
 }