Beispiel #1
0
        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));
        }
Beispiel #2
0
        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());
        }