|
|
@ -31,10 +31,10 @@ namespace NzbDrone.Core.Notifications.Plex.PlexTv
|
|
|
|
var requestBuilder = new HttpRequestBuilder("https://plex.tv/api/v2/pins")
|
|
|
|
var requestBuilder = new HttpRequestBuilder("https://plex.tv/api/v2/pins")
|
|
|
|
.Accept(HttpAccept.Json)
|
|
|
|
.Accept(HttpAccept.Json)
|
|
|
|
.AddQueryParam("X-Plex-Client-Identifier", clientIdentifier)
|
|
|
|
.AddQueryParam("X-Plex-Client-Identifier", clientIdentifier)
|
|
|
|
.AddQueryParam("X-Plex-Product", "Lidarr")
|
|
|
|
.AddQueryParam("X-Plex-Product", BuildInfo.AppName)
|
|
|
|
.AddQueryParam("X-Plex-Platform", "Windows")
|
|
|
|
.AddQueryParam("X-Plex-Platform", "Windows")
|
|
|
|
.AddQueryParam("X-Plex-Platform-Version", "7")
|
|
|
|
.AddQueryParam("X-Plex-Platform-Version", "7")
|
|
|
|
.AddQueryParam("X-Plex-Device-Name", "Lidarr")
|
|
|
|
.AddQueryParam("X-Plex-Device-Name", BuildInfo.AppName)
|
|
|
|
.AddQueryParam("X-Plex-Version", BuildInfo.Version.ToString())
|
|
|
|
.AddQueryParam("X-Plex-Version", BuildInfo.Version.ToString())
|
|
|
|
.AddQueryParam("strong", true);
|
|
|
|
.AddQueryParam("strong", true);
|
|
|
|
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ namespace NzbDrone.Core.Notifications.Plex.PlexTv
|
|
|
|
.AddQueryParam("clientID", clientIdentifier)
|
|
|
|
.AddQueryParam("clientID", clientIdentifier)
|
|
|
|
.AddQueryParam("forwardUrl", callbackUrl)
|
|
|
|
.AddQueryParam("forwardUrl", callbackUrl)
|
|
|
|
.AddQueryParam("code", pinCode)
|
|
|
|
.AddQueryParam("code", pinCode)
|
|
|
|
.AddQueryParam("context[device][product]", "Lidarr")
|
|
|
|
.AddQueryParam("context[device][product]", BuildInfo.AppName)
|
|
|
|
.AddQueryParam("context[device][platform]", "Windows")
|
|
|
|
.AddQueryParam("context[device][platform]", "Windows")
|
|
|
|
.AddQueryParam("context[device][platformVersion]", "7")
|
|
|
|
.AddQueryParam("context[device][platformVersion]", "7")
|
|
|
|
.AddQueryParam("context[device][version]", BuildInfo.Version.ToString());
|
|
|
|
.AddQueryParam("context[device][version]", BuildInfo.Version.ToString());
|
|
|
@ -73,9 +73,11 @@ namespace NzbDrone.Core.Notifications.Plex.PlexTv
|
|
|
|
PinId = pinId
|
|
|
|
PinId = pinId
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string GetAuthToken(int pinId)
|
|
|
|
public string GetAuthToken(int pinId)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var authToken = _proxy.GetAuthToken(_configService.PlexClientIdentifier, pinId);
|
|
|
|
var authToken = _proxy.GetAuthToken(_configService.PlexClientIdentifier, pinId);
|
|
|
|
|
|
|
|
|
|
|
|
return authToken;
|
|
|
|
return authToken;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|