Added: Functionality to XBMC and Plex to update indivdual titles. Also: Notification Cleanup (#2240)

This commit is contained in:
fhscholl
2017-11-10 10:11:09 -05:00
committed by Leonardo Galli
parent 32b1f75eb3
commit c7c423b13d
53 changed files with 251 additions and 1115 deletions

View File

@@ -1,6 +1,8 @@
using NzbDrone.Common.Http;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.Rest;
using System;
using System.Text;
namespace NzbDrone.Core.Notifications.Webhook
{
@@ -30,6 +32,13 @@ namespace NzbDrone.Core.Notifications.Webhook
request.Headers.ContentType = "application/json";
request.SetContent(body.ToJson());
if (!String.IsNullOrEmpty(settings.Username) || !String.IsNullOrEmpty(settings.Password))
{
var authInfo = settings.Username + ":" + settings.Password;
authInfo = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(authInfo));
request.Headers.Set("Authorization", "Basic " + authInfo);
}
_httpClient.Execute(request);
}
catch (RestException ex)