mirror of
https://github.com/Radarr/Radarr
synced 2024-12-23 00:12:44 +00:00
40 lines
958 B
C#
40 lines
958 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using NzbDrone.Core.Controllers;
|
|
using NzbDrone.Web.Models;
|
|
|
|
namespace NzbDrone.Web.Controllers
|
|
{
|
|
public class SettingsController : Controller
|
|
{
|
|
//
|
|
// GET: /Settings/
|
|
private IConfigController _configController;
|
|
|
|
public SettingsController(IConfigController configController)
|
|
{
|
|
_configController = configController;
|
|
}
|
|
|
|
public ActionResult Index()
|
|
{
|
|
return View(new SettingsModel() { TvFolder = _configController.SeriesRoot });
|
|
}
|
|
|
|
[HttpPost]
|
|
public ActionResult Index(SettingsModel model)
|
|
{
|
|
if (ModelState.IsValid)
|
|
{
|
|
_configController.SeriesRoot = model.TvFolder;
|
|
//return RedirectToAction("index");
|
|
}
|
|
|
|
return View(model);
|
|
}
|
|
|
|
}
|
|
}
|