mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
Added UserAgent to RestClient.
This commit is contained in:
committed by
Mark McDowall
parent
e9f39493f4
commit
9a649cf58e
@@ -7,6 +7,7 @@ using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.Cache;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Core.Rest;
|
||||
using RestSharp;
|
||||
|
||||
namespace NzbDrone.Core.Notifications.Plex
|
||||
@@ -75,7 +76,7 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||
|
||||
private RestClient GetMyPlexClient(string username, string password)
|
||||
{
|
||||
var client = new RestClient("https://my.plexapp.com");
|
||||
var client = RestClientFactory.BuildClient("https://my.plexapp.com");
|
||||
client.Authenticator = new HttpBasicAuthenticator(username, password);
|
||||
|
||||
return client;
|
||||
@@ -96,7 +97,7 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||
|
||||
private RestClient GetPlexServerClient(PlexServerSettings settings)
|
||||
{
|
||||
return new RestClient(String.Format("http://{0}:{1}", settings.Host, settings.Port));
|
||||
return RestClientFactory.BuildClient(String.Format("http://{0}:{1}", settings.Host, settings.Port));
|
||||
}
|
||||
|
||||
private RestRequest GetPlexServerRequest(string resource, Method method, PlexServerSettings settings)
|
||||
|
||||
Reference in New Issue
Block a user