public bool Contains(TorznabCategory cat) { if (this == cat) { return(true); } if (SubCategories.Contains(cat)) { return(true); } return(false); }
protected void AddMultiCategoryMapping(TorznabCategory newznabCategory, params int[] trackerCategories) { foreach (var trackerCat in trackerCategories) { categoryMapping.Add(new CategoryMapping(trackerCat.ToString(), newznabCategory.ID)); } }
protected void AddCategoryMapping(string trackerCategory, TorznabCategory newznabCategory) { categoryMapping.Add(new CategoryMapping(trackerCategory.ToString(), newznabCategory.ID)); if (!TorznabCaps.Categories.Contains(newznabCategory)) TorznabCaps.Categories.Add(newznabCategory); }
protected void AddMultiCategoryMapping(TorznabCategory newznabCategory, params int[] trackerCategories) { foreach (var trackerCat in trackerCategories) { AddCategoryMapping(trackerCat, newznabCategory); } }
protected void AddCategoryMapping(int trackerCategory, TorznabCategory newznabCategory) { AddCategoryMapping(trackerCategory.ToString(), newznabCategory); }
void AddCat(int cat, TorznabCategory catType, string label) { AddCategoryMapping(cat, catType); categoryLabels.Add(label, cat); }
protected void AddCategoryMapping(int trackerCategory, TorznabCategory newznabCategory, string trackerCategoryDesc = null) { AddCategoryMapping(trackerCategory.ToString(), newznabCategory, trackerCategoryDesc); }