Connect to SAB over SSL (optional)

New: Ability to connect to SABnzbd over SSL
pull/33/merge
Mark McDowall 11 years ago
parent 89c2ff6107
commit 938b5f1ae3

@ -128,6 +128,13 @@ namespace NzbDrone.Core.Configuration
set { SetValue("SabOlderTvPriority", value); }
}
public bool SabUseSsl
{
get { return GetValueBoolean("SabUseSsl", false); }
set { SetValue("SabUseSsl", value); }
}
public String DownloadedEpisodesFolder
{
get { return GetValue(ConfigKey.DownloadedEpisodesFolder.ToString()); }
@ -162,7 +169,7 @@ namespace NzbDrone.Core.Configuration
public DownloadClientType DownloadClient
{
get { return GetValueEnum("DownloadClient", DownloadClientType.Sabnzbd); }
get { return GetValueEnum("DownloadClient", DownloadClientType.Blackhole); }
set { SetValue("DownloadClient", value); }
}

@ -18,6 +18,7 @@ namespace NzbDrone.Core.Configuration
String SabTvCategory { get; set; }
SabPriorityType SabRecentTvPriority { get; set; }
SabPriorityType SabOlderTvPriority { get; set; }
Boolean SabUseSsl { get; set; }
String DownloadedEpisodesFolder { get; set; }
bool UseSeasonFolder { get; set; }
string SeasonFolderFormat { get; set; }

@ -221,7 +221,10 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
private string GetSabRequest(string action)
{
return string.Format(@"http://{0}:{1}/api?{2}&apikey={3}&ma_username={4}&ma_password={5}",
var protocol = _configService.SabUseSsl ? "https" : "http";
return string.Format(@"{0}://{1}:{2}/api?{3}&apikey={4}&ma_username={5}&ma_password={6}",
protocol,
_configService.SabHost,
_configService.SabPort,
action,

@ -96,4 +96,25 @@
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Use SSL</label>
<div class="controls">
<label class="checkbox toggle well">
<input type="checkbox" name="sabUseSsl" class="x-ssl"/>
<p>
<span>Yes</span>
<span>No</span>
</p>
<div class="btn btn-primary slide-button"/>
</label>
<span class="help-inline-checkbox">
<i class="icon-nd-form-info" title="Connect to SABnzbd over SSL"/>
</span>
</div>
</div>
</fieldset>

Loading…
Cancel
Save