You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/NzbDrone.Web/Controllers/SettingsController.cs

42 lines
1005 B

14 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
14 years ago
using System.Web;
using System.Web.Mvc;
using NzbDrone.Core.Providers;
using NzbDrone.Web.Models;
14 years ago
namespace NzbDrone.Web.Controllers
{
[HandleError]
14 years ago
public class SettingsController : Controller
{
//
// GET: /Settings/
private IConfigProvider _configProvider;
public SettingsController(IConfigProvider configProvider)
{
_configProvider = configProvider;
}
14 years ago
public ActionResult Index()
{
return View(new SettingsModel() { TvFolder = _configProvider.SeriesRoot });
}
[HttpPost]
public ActionResult Index(SettingsModel model)
{
if (ModelState.IsValid)
{
_configProvider.SeriesRoot = model.TvFolder;
//return RedirectToAction("index");
}
return RedirectToAction("index", "series");
14 years ago
}
}
}