public List <TagDetails> Details() { var tags = All(); var delayProfiles = _delayProfileService.All(); var importLists = _importListFactory.All(); var notifications = _notificationFactory.All(); var restrictions = _restrictionService.All(); var movies = _movieService.AllMovieTags(); var indexers = _indexerService.All(); var details = new List <TagDetails>(); foreach (var tag in tags) { details.Add(new TagDetails { Id = tag.Id, Label = tag.Label, DelayProfileIds = delayProfiles.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), ImportListIds = importLists.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), NotificationIds = notifications.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), RestrictionIds = restrictions.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList(), MovieIds = movies.Where(c => c.Value.Contains(tag.Id)).Select(c => c.Key).ToList(), IndexerIds = indexers.Where(c => c.Tags.Contains(tag.Id)).Select(c => c.Id).ToList() }); } return(details); }
private List <RestrictionResource> GetAllRestrictions() { return(_restrictionService.All().ToResource()); }
public List <RestrictionResource> GetAll() { return(_restrictionService.All().ToResource()); }