mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
Added: Functionality to XBMC and Plex to update indivdual titles. Also: Notification Cleanup (#2240)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user