pull/1011/head
tidusjar 8 years ago
parent b2417d8477
commit ffc3d6aa8a

@ -32,6 +32,13 @@ namespace Ombi.Core.SettingModels
public string ApiKey { get; set; }
public string QualityProfile { get; set; }
public bool SeasonFolders { get; set; }
/// <summary>
/// This is the root path ID
/// </summary>
/// <value>
/// The root path.
/// </value>
public string RootPath { get; set; }
public string FullRootPath { get; set; }
}
}

@ -85,7 +85,7 @@ namespace Ombi.Core
var latest = model.SeasonsRequested?.Equals("Latest", StringComparison.CurrentCultureIgnoreCase);
var specificSeasonRequest = model.SeasonList?.Any();
var rootFolderPath = model.RootFolderSelected <= 0 ? sonarrSettings.RootPath : await GetRootPath(model.RootFolderSelected, sonarrSettings);
var rootFolderPath = model.RootFolderSelected <= 0 ? sonarrSettings.FullRootPath : await GetRootPath(model.RootFolderSelected, sonarrSettings);
if (episodeRequest)
{

@ -70,7 +70,7 @@ namespace Ombi.Core
{
int.TryParse(sonarrSettings.QualityProfile, out qualityProfile);
}
var rootFolderPath = model.RootFolderSelected <= 0 ? sonarrSettings.RootPath : await GetRootPath(model.RootFolderSelected, sonarrSettings);
var rootFolderPath = model.RootFolderSelected <= 0 ? sonarrSettings.FullRootPath : await GetRootPath(model.RootFolderSelected, sonarrSettings);
var series = await GetSonarrSeries(sonarrSettings, model.ProviderId);

@ -15,6 +15,8 @@
<form class="form-horizontal" method="POST" id="mainForm">
<fieldset>
<legend>Sonarr Settings</legend>
<input hidden="hidden" name="FullRootPath" id="fullRootPath" value="@Model.FullRootPath"/>
<div class="form-group">
<div class="checkbox">
@if (Model.Enabled)
@ -220,6 +222,8 @@
}
var qualityProfile = $("#profiles option:selected").val();
var rootFolder = $("#rootFolders option:selected").val();
var rootFolderPath = $('#rootFolders option:selected').text();
$('#fullRootPath').val(rootFolderPath);
var $form = $("#mainForm");

Loading…
Cancel
Save