mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-03 05:25:10 +00:00
fixed config post issue
This commit is contained in:
parent
d7bae9135c
commit
1620721efe
5 changed files with 6 additions and 2 deletions
|
@ -68,6 +68,9 @@ private string GetValue(string key, object defaultValue, bool makePermanent)
|
||||||
|
|
||||||
private void SetValue(string key, string value)
|
private void SetValue(string key, string value)
|
||||||
{
|
{
|
||||||
|
if (String.IsNullOrEmpty(key)) throw new ArgumentOutOfRangeException("key");
|
||||||
|
if (value== null) throw new ArgumentNullException("key");
|
||||||
|
|
||||||
_logger.DebugFormat("Writing Setting to file. Key:'{0}' Value:'{1}'", key, value);
|
_logger.DebugFormat("Writing Setting to file. Key:'{0}' Value:'{1}'", key, value);
|
||||||
|
|
||||||
_sonicRepo.Add(new Config { Key = key, Value = value });
|
_sonicRepo.Add(new Config { Key = key, Value = value });
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -25,7 +25,7 @@ public ActionResult Index()
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public ActionResult Save(SettingsModel model)
|
public ActionResult Index(SettingsModel model)
|
||||||
{
|
{
|
||||||
if (ModelState.IsValid)
|
if (ModelState.IsValid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NzbDrone.Web.Models.SettingsModel>" %>
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NzbDrone.Web.Models.SettingsModel>" %>
|
||||||
<%@ Import Namespace="NzbDrone.Web.Controllers" %>
|
|
||||||
|
|
||||||
|
<%@ Import Namespace="NzbDrone.Web.Controllers" %>
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
||||||
Index
|
Index
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
Settings</h2>
|
Settings</h2>
|
||||||
<% using (Html.BeginForm())
|
<% using (Html.BeginForm())
|
||||||
{ %>
|
{ %>
|
||||||
|
<%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
|
||||||
<div>
|
<div>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>General</legend>
|
<legend>General</legend>
|
||||||
|
|
Loading…
Reference in a new issue