public ActionResult Misc() { var model = new MiscSettingsModel(); model.EnableBacklogSearching = _configProvider.EnableBacklogSearching; model.AutoIgnorePreviouslyDownloadedEpisodes = _configProvider.AutoIgnorePreviouslyDownloadedEpisodes; model.AllowedReleaseGroups = _configProvider.AllowedReleaseGroups; model.IgnoreArticlesWhenSortingSeries = _configProvider.IgnoreArticlesWhenSortingSeries; return(View(model)); }
public JsonResult SaveMisc(MiscSettingsModel data) { if (ModelState.IsValid) { _configProvider.EnableBacklogSearching = data.EnableBacklogSearching; _configProvider.AutoIgnorePreviouslyDownloadedEpisodes = data.AutoIgnorePreviouslyDownloadedEpisodes; _configProvider.AllowedReleaseGroups = data.AllowedReleaseGroups; _configProvider.IgnoreArticlesWhenSortingSeries = data.IgnoreArticlesWhenSortingSeries; return(GetSuccessResult()); } return(GetInvalidModelResult()); }