1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

Merge branch 'markus101'

This commit is contained in:
kay.one 2011-04-25 13:33:09 -07:00
commit eea6c2f896
3 changed files with 26 additions and 38 deletions

View File

@ -201,7 +201,6 @@ public virtual int DefaultQualityProfile
set { SetValue("DefaultQualityProfile", value); } set { SetValue("DefaultQualityProfile", value); }
} }
private string GetValue(string key) private string GetValue(string key)
{ {
return GetValue(key, String.Empty, false); return GetValue(key, String.Empty, false);

View File

@ -64,10 +64,8 @@ public ActionResult Indexers()
return View("Index", new IndexerSettingsModel return View("Index", new IndexerSettingsModel
{ {
NzbMatrixUsername = NzbMatrixUsername = _configProvider.NzbMatrixUsername,
_configProvider.GetValue("NzbMatrixUsername", String.Empty, true), NzbMatrixApiKey = _configProvider.NzbMatrixApiKey,
NzbMatrixApiKey =
_configProvider.GetValue("NzbMatrixApiKey", String.Empty, true),
NzbsrusUId = _configProvider.NzbsrusUId, NzbsrusUId = _configProvider.NzbsrusUId,
NzbsrusHash = _configProvider.NzbsrusHash, NzbsrusHash = _configProvider.NzbsrusHash,
@ -91,22 +89,21 @@ public ActionResult Downloads()
var model = new DownloadSettingsModel var model = new DownloadSettingsModel
{ {
SyncFrequency = Convert.ToInt32(_configProvider.GetValue("SyncFrequency", "15", true)), SyncFrequency = Convert.ToInt32(_configProvider.SyncFrequency),
DownloadPropers = DownloadPropers = Convert.ToBoolean(_configProvider.DownloadPropers),
Convert.ToBoolean(_configProvider.GetValue("DownloadPropers", "false", true)), Retention = Convert.ToInt32(_configProvider.Retention),
Retention = Convert.ToInt32(_configProvider.GetValue("Retention", "500", true)), SabHost = _configProvider.SabHost,
SabHost = _configProvider.GetValue("SabHost", "localhost", true), SabPort = Convert.ToInt32(_configProvider.SabPort),
SabPort = Convert.ToInt32(_configProvider.GetValue("SabPort", "8080", true)), SabApiKey = _configProvider.SabApiKey,
SabApiKey = _configProvider.GetValue("SabApiKey", String.Empty, true), SabUsername = _configProvider.SabUsername,
SabUsername = _configProvider.GetValue("SabUsername", String.Empty, true), SabPassword = _configProvider.SabPassword,
SabPassword = _configProvider.GetValue("SabPassword", String.Empty, true), SabTvCategory = _configProvider.SabTvCategory,
SabTvCategory = _configProvider.GetValue("SabTvCategory", String.Empty, true),
SabTvPriority = SabTvPriority =
(SabnzbdPriorityType) (SabnzbdPriorityType)
Enum.Parse(typeof(SabnzbdPriorityType), Enum.Parse(typeof(SabnzbdPriorityType),
_configProvider.GetValue("SabTvPriority", "Normal", true)), _configProvider.SabTvPriority),
UseBlackHole = Convert.ToBoolean(_configProvider.GetValue("UseBlackHole", true, true)), UseBlackHole = Convert.ToBoolean(_configProvider.UseBlackhole),
BlackholeDirectory = _configProvider.GetValue("BlackholeDirectory", String.Empty, true) BlackholeDirectory = _configProvider.BlackholeDirectory
}; };
return View("Index", model); return View("Index", model);
@ -129,7 +126,7 @@ public ActionResult Quality()
var profiles = _qualityProvider.GetAllProfiles().ToList(); var profiles = _qualityProvider.GetAllProfiles().ToList();
var defaultQualityQualityProfileId = var defaultQualityQualityProfileId =
Convert.ToInt32(_configProvider.GetValue("DefaultQualityProfile", profiles[0].QualityProfileId, true)); Convert.ToInt32(_configProvider.DefaultQualityProfile);
var selectList = new SelectList(profiles, "QualityProfileId", "Name"); var selectList = new SelectList(profiles, "QualityProfileId", "Name");
@ -151,25 +148,16 @@ public ActionResult Notifications()
var model = new NotificationSettingsModel var model = new NotificationSettingsModel
{ {
XbmcEnabled = Convert.ToBoolean(_configProvider.GetValue("XbmcEnabled", false, true)), XbmcEnabled = Convert.ToBoolean(_configProvider.GetValue("XbmcEnabled", false, true)),
XbmcNotifyOnGrab = XbmcNotifyOnGrab = Convert.ToBoolean(_configProvider.GetValue("XbmcNotifyOnGrab", false, true)),
Convert.ToBoolean(_configProvider.GetValue("XbmcNotifyOnGrab", false, true)), XbmcNotifyOnDownload = Convert.ToBoolean(_configProvider.GetValue("XbmcNotifyOnDownload", false, true)),
XbmcNotifyOnDownload = XbmcNotifyOnRename = Convert.ToBoolean(_configProvider.GetValue("XbmcNotifyOnRename", false, true)),
Convert.ToBoolean(_configProvider.GetValue("XbmcNotifyOnDownload", false, true)), XbmcNotificationImage = Convert.ToBoolean(_configProvider.GetValue("XbmcNotificationImage", false, true)),
XbmcNotifyOnRename =
Convert.ToBoolean(_configProvider.GetValue("XbmcNotifyOnRename", false, true)),
XbmcNotificationImage =
Convert.ToBoolean(_configProvider.GetValue("XbmcNotificationImage", false, true)),
XbmcDisplayTime = Convert.ToInt32(_configProvider.GetValue("XbmcDisplayTime", 3, true)), XbmcDisplayTime = Convert.ToInt32(_configProvider.GetValue("XbmcDisplayTime", 3, true)),
XbmcUpdateOnDownload = XbmcUpdateOnDownload = Convert.ToBoolean(_configProvider.GetValue("XbmcUpdateOnDownload ", false, true)),
Convert.ToBoolean(_configProvider.GetValue("XbmcUpdateOnDownload ", false, true)), XbmcUpdateOnRename = Convert.ToBoolean(_configProvider.GetValue("XbmcUpdateOnRename", false, true)),
XbmcUpdateOnRename = XbmcFullUpdate = Convert.ToBoolean(_configProvider.GetValue("XbmcFullUpdate", false, true)),
Convert.ToBoolean(_configProvider.GetValue("XbmcUpdateOnRename", false, true)), XbmcCleanOnDownload = Convert.ToBoolean(_configProvider.GetValue("XbmcCleanOnDownload", false, true)),
XbmcFullUpdate = XbmcCleanOnRename = Convert.ToBoolean(_configProvider.GetValue("XbmcCleanOnRename", false, true)),
Convert.ToBoolean(_configProvider.GetValue("XbmcFullUpdate", false, true)),
XbmcCleanOnDownload =
Convert.ToBoolean(_configProvider.GetValue("XbmcCleanOnDownload", false, true)),
XbmcCleanOnRename =
Convert.ToBoolean(_configProvider.GetValue("XbmcCleanOnRename", false, true)),
XbmcHosts = _configProvider.GetValue("XbmcHosts", "localhost:80", true), XbmcHosts = _configProvider.GetValue("XbmcHosts", "localhost:80", true),
XbmcUsername = _configProvider.GetValue("XbmcUsername", String.Empty, true), XbmcUsername = _configProvider.GetValue("XbmcUsername", String.Empty, true),
XbmcPassword = _configProvider.GetValue("XbmcPassword", String.Empty, true) XbmcPassword = _configProvider.GetValue("XbmcPassword", String.Empty, true)

View File

@ -16,6 +16,7 @@
function selectDownloadOptionAtStart() { function selectDownloadOptionAtStart() {
var checked = $('UseBlackHole').val(); var checked = $('UseBlackHole').val();
var $radios = $('input[name="UseBlackhole"]');
$radios.filter('[value=' + checked + ']').attr('checked', true); $radios.filter('[value=' + checked + ']').attr('checked', true);
selectDownloadOption(); selectDownloadOption();
} }
@ -89,7 +90,7 @@
<div> <div>
<div> <div>
<b>@Html.LabelFor(m => m.UseBlackHole)</b> <b>@Html.LabelFor(m => m.UseBlackHole)</b>
@Html.CheckBoxFor(m => m.UseBlackHole, new { style="display:block" }) @Html.CheckBoxFor(m => m.UseBlackHole, new { style="display:none" })
</div> </div>
<div> <div>
@Html.RadioButton("UseBlackhole", true, new { @class="blackhole_radio" })Blackhole @Html.RadioButton("UseBlackhole", true, new { @class="blackhole_radio" })Blackhole