From b1025e7229280d3b887a15396e46d4a904a15aad Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Fri, 28 Apr 2017 13:14:00 +0200 Subject: [PATCH] Use Post for tmdbids request, to avoid too long URIs. --- src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs index 36afb7252..0286082c1 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/SkyHookProxy.cs @@ -15,6 +15,7 @@ using NzbDrone.Core.Tv; using System.Threading; using NzbDrone.Core.Parser; using NzbDrone.Core.Profiles; +using NzbDrone.Common.Serializer; namespace NzbDrone.Core.MetadataSource.SkyHook { @@ -351,11 +352,15 @@ namespace NzbDrone.Core.MetadataSource.SkyHook public List DiscoverNewMovies() { string allIds = string.Join(",", _movieService.GetAllMovies().Select(m => m.TmdbId)); - var request = new HttpRequestBuilder("https://radarr.video/recommendations/api.php").AddQueryParam("tmdbids", allIds).Build(); + var request = new HttpRequestBuilder("https://radarr.video/recommendations/api.php").Build(); request.AllowAutoRedirect = true; + request.Method = HttpMethod.POST; + request.Headers.ContentType = "application/x-www-form-urlencoded"; + request.SetContent($"tmdbids={allIds}"); - var response = _httpClient.Get>(request); + + var response = _httpClient.Post>(request); if (response.StatusCode != HttpStatusCode.OK) { throw new HttpException(request, response);