1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Connect to SAB over SSL (optional)

New: Ability to connect to SABnzbd over SSL
This commit is contained in:
Mark McDowall 2013-10-03 11:12:12 -07:00
parent 89c2ff6107
commit 938b5f1ae3
5 changed files with 35 additions and 3 deletions

View File

@ -128,6 +128,13 @@ public SabPriorityType SabOlderTvPriority
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 @@ public int Retention
public DownloadClientType DownloadClient
{
get { return GetValueEnum("DownloadClient", DownloadClientType.Sabnzbd); }
get { return GetValueEnum("DownloadClient", DownloadClientType.Blackhole); }
set { SetValue("DownloadClient", value); }
}

View File

@ -18,6 +18,7 @@ public interface IConfigService
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; }

View File

@ -221,7 +221,10 @@ public virtual string Test(string host, int port, string apiKey, string username
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,

View File

@ -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>