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

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

            return(false);
        }
Example #2
0
 protected void AddMultiCategoryMapping(TorznabCategory newznabCategory, params int[] trackerCategories)
 {
     foreach (var trackerCat in trackerCategories)
     {
         categoryMapping.Add(new CategoryMapping(trackerCat.ToString(), newznabCategory.ID));
     }
 }
Example #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);
 }
Example #4
0
 protected void AddMultiCategoryMapping(TorznabCategory newznabCategory, params int[] trackerCategories)
 {
     foreach (var trackerCat in trackerCategories)
     {
         AddCategoryMapping(trackerCat, newznabCategory);
     }
 }
Example #5
0
 protected void AddCategoryMapping(int trackerCategory, TorznabCategory newznabCategory)
 {
     AddCategoryMapping(trackerCategory.ToString(), newznabCategory);
 }
Example #6
0
 void AddCat(int cat, TorznabCategory catType, string label)
 {
     AddCategoryMapping(cat, catType);
     categoryLabels.Add(label, cat);
 }
Example #7
0
 protected void AddCategoryMapping(int trackerCategory, TorznabCategory newznabCategory, string trackerCategoryDesc = null)
 {
     AddCategoryMapping(trackerCategory.ToString(), newznabCategory, trackerCategoryDesc);
 }