mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-03 21:45:05 +00:00
Fixed: Url Encode password and category for SAB
This commit is contained in:
parent
c10f02e0b1
commit
f314fab878
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ public SabnzbdProxy(Logger logger)
|
|||
public SabnzbdAddResponse DownloadNzb(Byte[] nzbData, string title, string category, int priority, SabnzbdSettings settings)
|
||||
{
|
||||
var request = new RestRequest(Method.POST);
|
||||
var action = String.Format("mode=addfile&cat={0}&priority={1}", category, priority);
|
||||
var action = String.Format("mode=addfile&cat={0}&priority={1}", Uri.EscapeDataString(category), priority);
|
||||
|
||||
request.AddFile("name", nzbData, title, "application/x-nzb");
|
||||
|
||||
|
@ -131,7 +131,7 @@ private IRestClient BuildClient(string action, SabnzbdSettings settings)
|
|||
var protocol = settings.UseSsl ? "https" : "http";
|
||||
|
||||
var authentication = settings.ApiKey.IsNullOrWhiteSpace() ?
|
||||
String.Format("ma_username={0}&ma_password={1}", settings.Username, settings.Password) :
|
||||
String.Format("ma_username={0}&ma_password={1}", settings.Username, Uri.EscapeDataString(settings.Password)) :
|
||||
String.Format("apikey={0}", settings.ApiKey);
|
||||
|
||||
var url = String.Format(@"{0}://{1}:{2}/api?{3}&{4}&output=json",
|
||||
|
|
Loading…
Reference in a new issue